protecting files from deletion, and using --delete-excluded

Matt McCutchen hashproduct+rsync at gmail.com
Thu Aug 31 22:09:08 GMT 2006


On 8/31/06, Wayne Davison <wayned at samba.org> wrote:
> Yes, the code needs to continue to dump .cvsignore files.

That's the wrong fix.  In the presence of --delete-excluded, filters
in .cvsignore aren't ineffective because they're in .cvsignore;
they're ineffective because they are exclude filters rather than
protect filters.  Exclude filters in ordinary per-dir merge files take
effect despite --delete-excluded, and they shouldn't.  The correct fix
is to use the same criteria for immediate eliding in add_rule as for
delayed eliding in send_rules.  Of course, since .cvsignore files
happen to contain only exclude rules, eliding .cvsignore files
immediately would be a good optimization.

The attached patch fixes add_rule and adds a test for exclude filters
in ordinary per-dir merge files.  You decide whether to keep or revert
the immediate eliding of .cvsignore files; if you do, a comment
explaining that it is only an optimization would be helpful.

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dir-merge-del-ex.diff
Type: text/x-patch
Size: 1554 bytes
Desc: not available
Url : http://lists.samba.org/archive/rsync/attachments/20060831/b9532f4f/dir-merge-del-ex.bin


More information about the rsync mailing list