X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/408aa7b24c7ee02d530e05852fd8eb0f5abfc3fd..22558cdd7e827f3e838e0e1f50f9fb15ec3369e4:/testsuite/exclude.test diff --git a/testsuite/exclude.test b/testsuite/exclude.test index d314941d..61688611 100644 --- a/testsuite/exclude.test +++ b/testsuite/exclude.test @@ -25,9 +25,9 @@ makepath "$fromdir/bar/down/to/foo/too" makepath "$fromdir/bar/down/to/bar/baz" makepath "$fromdir/mid/for/foo/and/that/is/who" cat >"$fromdir/.excl" <"$fromdir/foo/file1" echo removed >"$fromdir/foo/file2" echo cvsout >"$fromdir/foo/file2.old" cat >"$fromdir/foo/.excl" <"$fromdir/bar/.excl" <"$fromdir/bar/down/to/home-cvs-exclude" @@ -129,12 +129,12 @@ rm "$chkdir"/bar/down/to/foo/*.junk rm "$chkdir"/bar/down/to/home-cvs-exclude rm "$chkdir"/mid/one-in-one-out -$RSYNC -av --existing --include='*/' --exclude='*' "$fromdir/" "$chkdir/" +$RSYNC -av --existing --filter='exclude,! */' "$fromdir/" "$chkdir/" # Now, test if rsync excludes the same files, this time with --cvs-exclude # and --delete-excluded. -checkit "$RSYNC -avvC --filter=\". $excl\" --delete-excluded \ +checkit "$RSYNC -avvC --filter=\"merge $excl\" --delete-excluded \ --delete-during \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir" # Modify the chk dir for our merge-exclude test and then tweak the dir times. @@ -145,18 +145,18 @@ cp -p "$fromdir"/bar/down/to/foo/*.junk "$chkdir"/bar/down/to/foo cp -p "$fromdir"/bar/down/to/foo/to "$chkdir"/bar/down/to/foo $RSYNC -av --existing --delete-excluded \ - --include='*/' --include='.excl*' --exclude='*' "$fromdir/" "$todir/" + --include='.excl*' --filter='-! */' "$fromdir/" "$todir/" echo retained >"$todir"/bar/down/to/bar/baz/nodel.deep cp -p "$todir"/bar/down/to/bar/baz/nodel.deep "$chkdir"/bar/down/to/bar/baz -$RSYNC -av --existing --include='*/' --exclude='*' "$fromdir/" "$chkdir/" +$RSYNC -av --existing --filter='-! */' "$fromdir/" "$chkdir/" # Now, test if rsync excludes the same files, this time with a merge-exclude # file. checkit "sed '/!/d' \"$excl\" | - $RSYNC -avv -f :_.excl -f ._- \ + $RSYNC -avv -f dir-merge_.excl -f merge_- \ --delete-during \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir" # Remove the files that --delete-excluded will delete. @@ -169,7 +169,7 @@ rm "$chkdir"/bar/down/to/bar/.excl2 rm "$chkdir"/mid/.excl rm "$chkdir"/bar/down/to/bar/baz/nodel.deep -$RSYNC -av --existing --include='*/' --exclude='*' "$fromdir/" "$chkdir/" +$RSYNC -av --existing --filter='-! */' "$fromdir/" "$chkdir/" # Finally, try the prior command with --delete-before and --delete-excluded.