The branch, master has been updated
via de6848ed Re-run the exclude test using lsh.sh pull.
from 42f83868 Improve `--mkpath` a bit more.
https://git.samba.org/?p=rsync.git;a=shortlog;h=master
- Log -
commit de6848ed97760de988e2a41af4d66bc4fd0f1995
Author: Wayne Davison
Date: Wed Oct 19 19:18:20 2022 -0700
Re-run the exclude test using lsh.sh pull.
The exclude.test file continues to run local copies (which are a special
kind of "push") while the exclude-lsh.test symlink runs a a "pull" using
the lsh.sh script as the "remote" shell.
---
Summary of changes:
testsuite/exclude-lsh.test | 1 +
testsuite/exclude.test | 65 --
2 files changed, 41 insertions(+), 25 deletions(-)
create mode 12 testsuite/exclude-lsh.test
Changeset truncated at 500 lines:
diff --git a/testsuite/exclude-lsh.test b/testsuite/exclude-lsh.test
new file mode 12
index ..84bc98ac
--- /dev/null
+++ b/testsuite/exclude-lsh.test
@@ -0,0 +1 @@
+exclude.test
\ No newline at end of file
diff --git a/testsuite/exclude.test b/testsuite/exclude.test
index 9b487b60..56b68b8c 100644
--- a/testsuite/exclude.test
+++ b/testsuite/exclude.test
@@ -15,6 +15,19 @@
CVSIGNORE='*.junk'
export CVSIGNORE
+case $0 in
+*-lsh.*)
+RSYNC_RSH="$scratchdir/src/support/lsh.sh"
+export RSYNC_RSH
+rpath=" --rsync-path='$RSYNC'"
+host='lh:'
+;;
+*)
+rpath=''
+host=''
+;;
+esac
+
# Build some files/dirs/links to copy
makepath "$fromdir/foo/down/to/you"
@@ -106,8 +119,8 @@ home-cvs-exclude
EOF
# Start with a check of --prune-empty-dirs:
-$RSYNC -av -f -_foo/too/ -f -_foo/down/ -f -_foo/and/ -f -_new/ "$fromdir/"
"$chkdir/"
-checkit "$RSYNC -av --prune-empty-dirs '$fromdir/' '$todir/'" "$chkdir"
"$todir"
+$RSYNC -av --rsync-path="$RSYNC" -f -_foo/too/ -f -_foo/down/ -f -_foo/and/ -f
-_new/ "$host$fromdir/" "$chkdir/"
+checkit "$RSYNC -av$rpath --prune-empty-dirs '$host$fromdir/' '$todir/'"
"$chkdir" "$todir"
rm -rf "$todir"
# Add a directory symlink.
@@ -120,7 +133,7 @@ touch "$scratchdir/up1/same-newness"
"$scratchdir/up2/same-newness"
touch "$scratchdir/up1/extra-src" "$scratchdir/up2/extra-dest"
# Create chkdir with what we expect to be excluded.
-checkit "$RSYNC -avv '$fromdir/' '$chkdir/'" "$fromdir" "$chkdir"
+checkit "$RSYNC -avv$rpath '$host$fromdir/' '$chkdir/'" "$fromdir" "$chkdir"
sleep 1 # Ensures that the rm commands will tweak the directory times.
rm -r "$chkdir"/foo/down
rm -r "$chkdir"/mid/for/foo/and
@@ -135,12 +148,12 @@ touch "$scratchdir/up1/src-newness"
"$scratchdir/up2/dst-newness"
# Un-tweak the directory times in our first (weak) exclude test (though
# it's a good test of the --existing option).
-$RSYNC -av --existing --include='*/' --exclude='*' "$fromdir/" "$chkdir/"
+$RSYNC -av --rsync-path="$RSYNC" --existing --include='*/' --exclude='*'
"$host$fromdir/" "$chkdir/"
# Now, test if rsync excludes the same files.
-checkit "$RSYNC -avv --exclude-from='$excl' \
---delete-during '$fromdir/' '$todir/'" "$chkdir" "$todir"
+checkit "$RSYNC -avv$rpath --exclude-from='$excl' \
+--delete-during '$host$fromdir/' '$todir/'" "$chkdir" "$todir"
# Modify the chk dir by removing cvs-ignored files and then tweaking the dir
times.
@@ -150,13 +163,15 @@ 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 --filter='exclude,! */' "$fromdir/" "$chkdir/"
+$RSYNC -av --rsync-path="$RSYNC" --existing --filter='exclude,! */'
"$host$fromdir/" "$chkdir/"
# Now, test if rsync excludes the same files, this time with --cvs-exclude
# and --delete-excluded.
-checkit "$RSYNC -avvC --filter='merge $excl' --delete-excluded \
---delete-during '$fromdir/' '$todir/'" "$chkdir" "$todir"
+# The -C option gets applied in a different order when pushing & pulling, so
we instead
+# add the 2 --cvs-exclude filter rules (":C" & "-C") via -f to keep the order
the same.
+checkit "$RSYNC -avv$rpath --filter='merge $excl' -f:C -f-C --delete-excluded \
+--delete-during '$host$fromdir/' '$todir/'" "$chkdir" "$todir"
# Modify the chk dir for our merge-exclude test and then tweak the dir times.
@@ -165,19 +180,19 @@ rm "$chkdir"/bar/down/to/bar/baz/*.deep
cp_touch "$fromdir"/bar/down/to/foo/*.junk "$chkdir"/bar/down/to/foo
cp_touch "$fromdir"/bar/down/to/foo/to "$chkdir"/bar/down/to/foo
-$RSYNC -av --existing -f 'show .filt*' -f 'hide,! */' --del "$fromdir/"
"$todir/"
+$RSYNC -av --rsync-path="$RSYNC" --existing -f 'show .filt*' -f 'hide,! */'
--del "$host$fromdir/" "$todir/"
echo retained >"$todir"/bar/down/to/bar/baz/nodel.deep
cp_touch "$todir"/bar/down/to/bar/baz/nodel.deep "$chkdir"/bar/down/to/bar/baz
-$RSYNC -av --existing --filter='-! */' "$fromdir/"