Idea: add support for rsync-style filter files

martin f krafft <[email protected]>
Newsgroups gmane.network.unison.devel
Message-ID <[email protected]>
Hello,

over at
https://groups.yahoo.com/neo/groups/unison-users/conversations/topics/11460,
the discussion about skipping hierarchies based on files present on
the filesystem has started anew. I confess that I have not
thoroughly researched all of the past regarding previous
discussions, but I would like to propose a way forward. If there's
a past discussion I missed, I would appreciate a pointer.

rsync(1) has a pretty nifty filter file specification, and I think
it would make most sense for unison to adopt it, at least in part.¹

¹) http://blog.mudflatsoftware.com/blog/2012/10/31/tricks-with-rsync-filter-rules/
and http://www.samba.org/ftp/rsync/rsync.html

Benjamin highlighted the main design decision that needs resolution
as being that we have to decide what to do if the filters in the two
locations (source and replica) disagree. And I would like to propose
a very simple approach and solution to this:

  1. only filters in the local (origin) replica apply. Ignore rules
     in remote profile files also don't apply, so this feels natural
     and should simplify the implementation a lot;

  2. the filter rules themselves are flexible enough to allow the
     user to individually select whether to sync the filter files
     themselves with the remote (local → remote only). This is
     similar to giving users the choice of whether to sync ~/.unison
     or parts thereof;

  3. if a filter file is retrieved from the remote, it only starts
     taking effect during the next unison run. A (configurable)
     warning could be issued if such a file is transferred and it's
     foreseeable that it'll affect future runs. This fetching could
     also be disabled with a configuration option;

  4. The name(s) of the file(s) containing filter rules could/should
     be configurable similar to how merge/diff is configurable, i.e.
     by path.

What do people think about this? Is this too simple or too complex?
Does it fall short anywhere, or is this a viable path? What are the
open questions?

Thanks,

-- 
@martinkrafft | http://madduck.net/ | http://two.sentenc.es/
 
tempt not a desperate man.
                                                -- william shakespeare
 
spamtraps: [email protected]

_______________________________________________
Unison-hackers mailing list
[email protected]
http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers
digital_signature_gpg.asc (application/pgp-signature, 1.1 KB)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQLvBAEBCgDZBQJU0iRawBEaaHR0cDovL21hcnRpbi1rcmFmZnQubmV0L2dwZy9z
aWctcG9saWN5LzU1Yzk4ODJkOTk5YmJjYzQvMjAxMTAxMjQxMTI1P3NoYTUxMnN1
bT0xY2FkOTZmZDI3ZDMyMzNmNTNlMjI4NDk1MzM2NDgxMDdlNWVlOGQ1YmU2NTUy
NTFkNzRjOGYxYzVjM2JjNDJmMjMwNGZhNTE1MTUwZjdiZDRkZDA1ZTk4MTk5MjRm
MDQ5NTEzZWU5OTYyY2E3MTcwOWY4MWQ5NDUxNTg1MmJkOAAKCRBVyYgtmZu8xPaK
EACK0uvJX1tMAQ6ptvVbvOoX6o1qT94GkiVbh1oqW9TXt2sAbS2py9ReM2G5whgd
y38w5X3NfLqtMN96PeWTVI+gJeBZptjYY9WpcrHvb8aFa/JVjsKyRcBB8fK3BU+e
Z0t03gUHQ+7IRNfFVNUy4YUZmhcy0TJBTKTUXWXWpag/IB78CrZpWBiKxKKF3jFz
uiR+vrq+FLeWofdYe4dzOkurE+eXLJYksn2U+Jy8EtDu11wdqFa9k9gCkF56LSUp
5oMEIhylV51tNyZSPRooZcf9BPc65QFAdtg0sQQLg6HEbnZ699nathaEAtoglf4Z
URa58ZPe0jBUXmGBeJFyk7nrA7gY8Jpz1hLAVzsCn0yamn4iyhy2rVuSSuKyoEhd
VA8A3CY5s6VAywsUmQ8OEAJls7MCODXc4W669FxxbLIl1aev5Akh12ItNdgj9JFh
swUcQuxQzpm7h/xF8ojHeIXSBLS4Y59P0NR1kHqW4HG87ibGYx5v1H0g7jn4A4pc
3XbSItK9E+2jS8I1ou6Cju0Wz6Dv9JEFxgn5zGSRBe6IyKJAnAbYtHSITxnR1rV4
usY2MbfRETkphjlGCSkVnAYlM7Qi8CXqYb1NR1AE6kL/Sb9zOCIEosWLc/K3eP4H
rASo+5JLYdkt8uFy/UwbuqzUQfU/Oa/xHVAJWCQzPLbDbw==
=Rf6v
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.