Re: Idea: add support for rsync-style filter files
martin f krafft <[email protected]>
| Newsgroups | gmane.network.unison.devel |
|---|---|
| Message-ID | <[email protected]> |
also sprach Benjamin C. Pierce <[email protected]> [2015-02-04 15:59 +0100]: > Most of this functionality is already present in Unison’s existing > preferences. Really? Filter files? > There may be room for small extensions, but the main design issue > is dealing with situations where the set of paths to be ignored is > different (for whatever reason) on the client and server. Well, my proposed solution is not to look at the two sets of paths, but only to look at one of them. I've hacked up a few stupid scripts now, which create include files in ~/.unison using find(1), e.g.: find $HOME -type d -name .git -printf '%h\n' \ | sed -e "s,${HOME}/,ignore = BelowPath ," to ignore all paths where there's a .git directory, or … -type f -name .unison-ignore … to "tag" paths to ignore with touch(1). I am currently working on a poor-man's rsync-filter-spec parser to turn simple filter files into such include files, e.g. a file ~/foo/bar/.backup-filter containing - bigfiles - /cache would be turned into ignore = Regex foo/bar/(.+/)*bigfiles ignore = BelowPath foo/bar/cache and then I just simply run that script before I run unison to generate all these ignore specs. It effectively does the same as what I am proposing, I think, but I can tell you that this poor-man's rsync-filter-spec parser is not making me happy! ;) -- @martinkrafft | http://madduck.net/ | http://two.sentenc.es/ "out of the crooked timber of humanity, no straight thing was ever made." -- imanuel kant 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 iQLvBAEBCgDZBQJU0oICwBEaaHR0cDovL21hcnRpbi1rcmFmZnQubmV0L2dwZy9z aWctcG9saWN5LzU1Yzk4ODJkOTk5YmJjYzQvMjAxMTAxMjQxMTI1P3NoYTUxMnN1 bT0xY2FkOTZmZDI3ZDMyMzNmNTNlMjI4NDk1MzM2NDgxMDdlNWVlOGQ1YmU2NTUy NTFkNzRjOGYxYzVjM2JjNDJmMjMwNGZhNTE1MTUwZjdiZDRkZDA1ZTk4MTk5MjRm MDQ5NTEzZWU5OTYyY2E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