"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
bisync: add tests for skipping the check for identical files
nielashff0704b7e2a1
diff --git a/cmd/bisync/bisync_test.go b/cmd/bisync/bisync_test.goindex 799e6a6bd..632b28df8 100644--- a/cmd/bisync/bisync_test.go+++ b/cmd/bisync/bisync_test.go@@ -231,6 +231,7 @@ type bisyncTest struct {TestFn bisync.TestFuncignoreModtime bool // ignore modtimes when comparing final listings, for backends without supportignoreBlankHash bool // ignore blank hashes for backends where we allow them to be blank+ ignoreChecksum bool // a step of this test case used --ignore-checksum}var color = bisync.Color@@ -436,6 +437,7 @@ func (b *bisyncTest) cleanupAll() {func (b *bisyncTest) runTestCase(ctx context.Context, t *testing.T, testCase string) {b.t = tb.testCase = testCase+ b.ignoreChecksum = falsevar err errorb.fs1, b.parent1, b.path1, b.canonPath1 = b.makeTempRemote(ctx, b.argRemote1, "path1")@@ -1197,6 +1199,9 @@ func (b *bisyncTest) runBisync(ctx context.Context, args []string) (err error) {ci.SizeOnly = truecase "ignore-size":ci.IgnoreSize = true+ case "ignore-checksum":+ ci.IgnoreChecksum = true+ b.ignoreChecksum = truecase "checksum":ci.CheckSum = trueopt.Compare.DownloadHash = true // allows us to test crypt and the like@@ -1767,6 +1772,16 @@ func (b *bisyncTest) mangleResult(dir, file string, golden bool) string {if b.testCase == "dry_run" {rep = append(rep, dryrunReplacements...)}+ if b.ignoreChecksum && b.fs1.Hashes().Overlap(b.fs2.Hashes()).Count() == 0 {+ // with no hash in common, --ignore-checksum skips the check for identical files instead of running it+ rep = append(rep,+ `^.*Checking potential conflicts\.\.\.$`, dropMe,+ `^.*: \d+ differences found$`, dropMe,+ `^.*: \d+ matching files$`, dropMe,+ `^.*Finished checking the potential conflicts.*$`, dropMe,+ `^.*Not checking potential conflicts.*$`, dropMe,+ )+ }repFrom := make([]*regexp.Regexp, len(rep)/2)repTo := make([]string, len(rep)/2)for i := 0; i < len(rep); i += 2 {diff --git a/cmd/bisync/checkfn_internal_test.go b/cmd/bisync/checkfn_internal_test.goindex 6a194f19c..6a8f4baba 100644--- a/cmd/bisync/checkfn_internal_test.go+++ b/cmd/bisync/checkfn_internal_test.go@@ -3,8 +3,10 @@ package bisyncimport ("context""testing"+ "time""github.com/rclone/rclone/fs"+ "github.com/rclone/rclone/fs/filter""github.com/rclone/rclone/fs/hash""github.com/rclone/rclone/fstest/mockfs""github.com/rclone/rclone/fstest/mockobject"@@ -57,3 +59,59 @@ func TestCheckFnMissingHash(t *testing.T) {})}}++func newEmptyFs(ctx context.Context, t *testing.T, fsName string, hashes hash.Set) fs.Fs {+ f, err := mockfs.NewFs(ctx, fsName, "", nil)+ require.NoError(t, err)+ f.(*mockfs.Fs).SetHashes(hashes)+ return f+}++func TestCheckConflictsSkipsCheck(t *testing.T) {+ md5 := hash.NewHashSet(hash.MD5)+ none := hash.NewHashSet()+ for _, test := range []struct {+ name string+ hashes2 hash.Set+ flag func(ci *fs.ConfigInfo)+ wantSkip bool+ }{+ {name: "common hash", hashes2: md5},+ {name: "no common hash", hashes2: none},+ {name: "size-only with a common hash", hashes2: md5, flag: func(ci *fs.ConfigInfo) { ci.SizeOnly = true }, wantSkip: true},+ {name: "size-only without a common hash", hashes2: none, flag: func(ci *fs.ConfigInfo) { ci.SizeOnly = true }, wantSkip: true},+ {name: "ignore-checksum with a common hash", hashes2: md5, flag: func(ci *fs.ConfigInfo) { ci.IgnoreChecksum = true }},+ {name: "ignore-checksum without a common hash", hashes2: none, flag: func(ci *fs.ConfigInfo) { ci.IgnoreChecksum = true }, wantSkip: true},+ } {+ t.Run(test.name, func(t *testing.T) {+ ctx, ci := fs.AddConfig(context.Background())+ if test.flag != nil {+ test.flag(ci)+ }+ ctx, fi := filter.AddConfig(ctx)+ require.NoError(t, fi.AddFile("file.txt"))++ b := &bisyncRun{opt: &Options{}}+ b.opt.Compare.Size = true+ b.opt.Compare.Modtime = true+ modtime := time.Date(2001, 2, 3, 4, 5, 6, 0, time.UTC)+ b.march.ls1, b.march.ls2 = newFileList(), newFileList()+ b.march.ls1.put("file.txt", 5, modtime, "", "-", "-")+ b.march.ls2.put("file.txt", 5, modtime, "", "-", "-")++ fs1 := newEmptyFs(ctx, t, "path1", md5)+ fs2 := newEmptyFs(ctx, t, "path2", test.hashes2)+ matches, matches1, matches2, err := b.checkconflicts(ctx, fi, fs1, fs2)+ require.NoError(t, err)++ assert.Equal(t, test.wantSkip, matches.Has("file.txt"), "matched a file that is on neither path")+ if test.wantSkip {+ assert.True(t, b.sameCompared(b.march.ls1, matches1, "file.txt", fs1), "Path1 differs from the listing")+ assert.True(t, b.sameCompared(b.march.ls2, matches2, "file.txt", fs2), "Path2 differs from the listing")+ } else {+ assert.False(t, matches1.has("file.txt"), "Path1 checked")+ assert.False(t, matches2.has("file.txt"), "Path2 checked")+ }+ })+ }+}diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.copy1to2.quenew file mode 100644index 000000000..8a5f92a1a--- /dev/null+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.copy1to2.que@@ -0,0 +1 @@+"file3.txt"diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lstindex 080041dd4..a460ba492 100644--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst@@ -2,7 +2,7 @@- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"+- 10 - - 2003-03-04T00:00:00.000000000+0000 "file3.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-newindex 080041dd4..a460ba492 100644--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-new+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-new@@ -2,7 +2,7 @@- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"+- 10 - - 2003-03-04T00:00:00.000000000+0000 "file3.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-old b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-oldindex 6e7bfe106..080041dd4 100644--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-old+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path1.lst-old@@ -1,7 +1,7 @@# bisync listing v1 from test- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file2.txt"+- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lstindex 080041dd4..a460ba492 100644--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst@@ -2,7 +2,7 @@- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"+- 10 - - 2003-03-04T00:00:00.000000000+0000 "file3.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-newindex 080041dd4..c78392d2b 100644--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-new+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-new@@ -2,7 +2,7 @@- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"+- 10 - - 2003-01-02T00:00:00.000000000+0000 "file3.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"diff --git a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-old b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-oldindex 6e7bfe106..080041dd4 100644--- a/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-old+++ b/cmd/bisync/testdata/test_conflict_window/golden/_testdir_path1.._testdir_path2.path2.lst-old@@ -1,7 +1,7 @@# bisync listing v1 from test- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"- 10 - - 2001-03-04T00:00:00.000000000+0000 "file1.txt"-- 0 - - 2000-01-01T00:00:00.000000000+0000 "file2.txt"+- 22 - - 2002-05-06T00:00:00.000000000+0000 "file2.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file3.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file4.txt"- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"diff --git a/cmd/bisync/testdata/test_conflict_window/golden/test.log b/cmd/bisync/testdata/test_conflict_window/golden/test.logindex 89bb38812..40801ecb2 100644--- a/cmd/bisync/testdata/test_conflict_window/golden/test.log+++ b/cmd/bisync/testdata/test_conflict_window/golden/test.log@@ -235,3 +235,80 @@ INFO : Files are equal! Skipping: file2.txtINFO : Updating listingsINFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"INFO : [32mBisync successful[0m++[36m(32) :[0m [34mtest changed on both paths, same size and modtime, different content - file3 (file3A, file3B)[0m+[36m(33) :[0m [34mtouch-glob 2003-01-02 {datadir/} file3*.txt[0m+[36m(34) :[0m [34mcopy-as {datadir/}file3A.txt {path1/} file3.txt[0m+[36m(35) :[0m [34mcopy-as {datadir/}file3B.txt {path2/} file3.txt[0m++[36m(36) :[0m [34mtest bisync with Path1 becoming identical to Path2 before the check, with a newer modtime[0m+[36m(37) :[0m [34mtouch-glob 2003-03-04 {datadir/} file3B.txt[0m+[36m(38) :[0m [34mhook before-check copy-as {datadir/}file3B.txt {path1/} file3.txt[0m+[36m(39) :[0m [34mbisync[0m+INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m+INFO : Bisyncing with Comparison Settings:+{+"Modtime": true,+"Size": true,+"Checksum": false,+"NoSlowHash": false,+"SlowHashSyncOnly": false,+"DownloadHash": false+}+INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"+INFO : Building Path1 and Path2 listings+INFO : Path1 checking for diffs+INFO : - [36mPath1[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile3.txt[0m+INFO : Path1: 1 changes: [32m 0 new[0m, [33m 1 modified[0m, [31m 0 deleted[0m+INFO : ([33mModified[0m: [36m 1 newer[0m, [34m 0 older[0m, [36m 1 larger[0m, [34m 0 smaller[0m)+INFO : Path2 checking for diffs+INFO : - [34mPath2[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile3.txt[0m+INFO : Path2: 1 changes: [32m 0 new[0m, [33m 1 modified[0m, [31m 0 deleted[0m+INFO : ([33mModified[0m: [36m 1 newer[0m, [34m 0 older[0m, [36m 1 larger[0m, [34m 0 smaller[0m)+INFO : Applying changes+NOTICE: [36mhook before-check:[0m [34mcopy-as {datadir/}file3B.txt {path1/} file3.txt[0m+INFO : Checking potential conflicts...+NOTICE: {path2String}: 0 differences found+NOTICE: {path2String}: 1 matching files+INFO : Finished checking the potential conflicts. %!s(<nil>)+NOTICE: - [34mWARNING[0m [35mNew or changed in both paths[0m - [36mfile3.txt[0m+INFO : Files are equal but changed after the listing was made, so will check again next run: file3.txt+INFO : Updating listings+INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"+INFO : [32mBisync successful[0m++[36m(40) :[0m [34mtest bisync after file3 changed before the check[0m+[36m(41) :[0m [34mbisync[0m+INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m+INFO : Bisyncing with Comparison Settings:+{+"Modtime": true,+"Size": true,+"Checksum": false,+"NoSlowHash": false,+"SlowHashSyncOnly": false,+"DownloadHash": false+}+INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"+INFO : Building Path1 and Path2 listings+INFO : Path1 checking for diffs+INFO : - [36mPath1[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile3.txt[0m+INFO : Path1: 1 changes: [32m 0 new[0m, [33m 1 modified[0m, [31m 0 deleted[0m+INFO : ([33mModified[0m: [36m 1 newer[0m, [34m 0 older[0m, [36m 1 larger[0m, [34m 0 smaller[0m)+INFO : Path2 checking for diffs+INFO : - [34mPath2[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile3.txt[0m+INFO : Path2: 1 changes: [32m 0 new[0m, [33m 1 modified[0m, [31m 0 deleted[0m+INFO : ([33mModified[0m: [36m 1 newer[0m, [34m 0 older[0m, [36m 1 larger[0m, [34m 0 smaller[0m)+INFO : Applying changes+INFO : Checking potential conflicts...+NOTICE: {path2String}: 0 differences found+NOTICE: {path2String}: 1 matching files+INFO : Finished checking the potential conflicts. %!s(<nil>)+NOTICE: - [34mWARNING[0m [35mNew or changed in both paths[0m - [36mfile3.txt[0m+INFO : file3.txt: Files are equal but will copy anyway to update modtime (will not rename)+INFO : - [36mPath1[0m [35m[32mQueue copy to[0m Path2[0m - [36m{path2/}file3.txt[0m+INFO : - [36mPath1[0m [35mDo queued copies to[0m - [36mPath2[0m+INFO : There was nothing to transfer+INFO : Updating listings+INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"+INFO : [32mBisync successful[0mdiff --git a/cmd/bisync/testdata/test_conflict_window/modfiles/file3A.txt b/cmd/bisync/testdata/test_conflict_window/modfiles/file3A.txtnew file mode 100644index 000000000..72a707eba--- /dev/null+++ b/cmd/bisync/testdata/test_conflict_window/modfiles/file3A.txt@@ -0,0 +1 @@+Version Adiff --git a/cmd/bisync/testdata/test_conflict_window/modfiles/file3B.txt b/cmd/bisync/testdata/test_conflict_window/modfiles/file3B.txtnew file mode 100644index 000000000..9084e7c47--- /dev/null+++ b/cmd/bisync/testdata/test_conflict_window/modfiles/file3B.txt@@ -0,0 +1 @@+Version Bdiff --git a/cmd/bisync/testdata/test_conflict_window/scenario.txt b/cmd/bisync/testdata/test_conflict_window/scenario.txtindex da7efbd33..c735cccf6 100644--- a/cmd/bisync/testdata/test_conflict_window/scenario.txt+++ b/cmd/bisync/testdata/test_conflict_window/scenario.txt@@ -2,6 +2,7 @@ test conflict window# Check identical files when the paths change between the listing snapshot and the check for identical files# - Path2 becomes identical to Path1 before the check, with a newer modtime file1 (file1A, file1B)# - Both paths change identically before the check on two runs in a row, then stop file2 (file2A, file2B, file2C)+# - Path1 becomes identical to Path2 before the check, with a newer modtime file3 (file3A, file3B)test initial bisyncbisync resync@@ -41,3 +42,16 @@ bisynctest bisync after file2 stops changingbisync++test changed on both paths, same size and modtime, different content - file3 (file3A, file3B)+touch-glob 2003-01-02 {datadir/} file3*.txt+copy-as {datadir/}file3A.txt {path1/} file3.txt+copy-as {datadir/}file3B.txt {path2/} file3.txt++test bisync with Path1 becoming identical to Path2 before the check, with a newer modtime+touch-glob 2003-03-04 {datadir/} file3B.txt+hook before-check copy-as {datadir/}file3B.txt {path1/} file3.txt+bisync++test bisync after file3 changed before the check+bisyncdiff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.copy1to2.queindex ce7f0ba5c..326617e33 100644--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.copy1to2.que+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.copy1to2.que@@ -1 +1 @@-"file10.txt"+"file11.txt"diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.delete2.que b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.delete2.queindex ce7f0ba5c..326617e33 100644--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.delete2.que+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.delete2.que@@ -1 +1 @@-"file10.txt"+"file11.txt"diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-newindex 6717df151..99e1afa3b 100644--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-new+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-new@@ -1,10 +1,10 @@# bisync listing v1 from test-- 109 - - 0001-01-01T00:00:00.000000000+0000 "RCLONE_TEST"-- 19 - - 0001-01-01T00:00:00.000000000+0000 "file1.txt"-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file2.txt"-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file3.txt"-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file4.txt"-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file5.txt"-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file6.txt"-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file7.txt"-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file8.txt"+- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"+- 19 - - 2023-08-26T00:00:00.000000000+0000 "file1.txt"+- 13 - - 2001-01-02T00:00:00.000000000+0000 "file2.txt"+- 13 - - 2002-02-02T00:00:00.000000000+0000 "file3.txt"+- 13 - - 2001-01-02T00:00:00.000000000+0000 "file4.txt"+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file7.txt"+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file8.txt"diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-old b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-oldindex 7e03bad99..ec4348c31 100644--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-old+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path1.lst-old@@ -1,7 +1,7 @@# bisync listing v1 from test- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"- 19 - - 2023-08-26T00:00:00.000000000+0000 "file1.txt"-- 14 - - 0001-01-01T00:00:00.000000000+0000 "file10.txt"+- 19 - - 2001-05-06T00:00:00.000000000+0000 "file11.txt"- 13 - - 2001-01-02T00:00:00.000000000+0000 "file2.txt"- 13 - - 2002-02-02T00:00:00.000000000+0000 "file3.txt"- 13 - - 2001-01-02T00:00:00.000000000+0000 "file4.txt"diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-newindex 33eaa6d6d..ec4348c31 100644--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-new+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-new@@ -1,11 +1,11 @@# bisync listing v1 from test-- 109 - - 0001-01-01T00:00:00.000000000+0000 "RCLONE_TEST"-- 19 - - 0001-01-01T00:00:00.000000000+0000 "file1.txt"-- 14 - - 0001-01-01T00:00:00.000000000+0000 "file10.txt"-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file2.txt"-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file3.txt"-- 13 - - 0001-01-01T00:00:00.000000000+0000 "file4.txt"-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file5.txt"-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file6.txt"-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file7.txt"-- 0 - - 0001-01-01T00:00:00.000000000+0000 "file8.txt"+- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"+- 19 - - 2023-08-26T00:00:00.000000000+0000 "file1.txt"+- 19 - - 2001-05-06T00:00:00.000000000+0000 "file11.txt"+- 13 - - 2001-01-02T00:00:00.000000000+0000 "file2.txt"+- 13 - - 2002-02-02T00:00:00.000000000+0000 "file3.txt"+- 13 - - 2001-01-02T00:00:00.000000000+0000 "file4.txt"+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file5.txt"+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file6.txt"+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file7.txt"+- 0 - - 2000-01-01T00:00:00.000000000+0000 "file8.txt"diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-old b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-oldindex 7e03bad99..ec4348c31 100644--- a/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-old+++ b/cmd/bisync/testdata/test_equal_skipped/golden/_testdir_path1.._testdir_path2.path2.lst-old@@ -1,7 +1,7 @@# bisync listing v1 from test- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"- 19 - - 2023-08-26T00:00:00.000000000+0000 "file1.txt"-- 14 - - 0001-01-01T00:00:00.000000000+0000 "file10.txt"+- 19 - - 2001-05-06T00:00:00.000000000+0000 "file11.txt"- 13 - - 2001-01-02T00:00:00.000000000+0000 "file2.txt"- 13 - - 2002-02-02T00:00:00.000000000+0000 "file3.txt"- 13 - - 2001-01-02T00:00:00.000000000+0000 "file4.txt"diff --git a/cmd/bisync/testdata/test_equal_skipped/golden/test.log b/cmd/bisync/testdata/test_equal_skipped/golden/test.logindex ab1af3fa5..812503029 100644--- a/cmd/bisync/testdata/test_equal_skipped/golden/test.log+++ b/cmd/bisync/testdata/test_equal_skipped/golden/test.log@@ -224,3 +224,64 @@ INFO : There was nothing to transferINFO : Updating listingsINFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"INFO : [32mBisync successful[0m++[36m(38) :[0m [34mtest new on both paths with --ignore-checksum and identical - file11[0m+[36m(39) :[0m [34mtouch-glob 2001-05-06 {datadir/} file11.txt[0m+[36m(40) :[0m [34mcopy-as {datadir/}file11.txt {path1/} file11.txt[0m+[36m(41) :[0m [34mcopy-as {datadir/}file11.txt {path2/} file11.txt[0m+[36m(42) :[0m [34mbisync ignore-checksum[0m+INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m+INFO : Bisyncing with Comparison Settings:+{+"Modtime": true,+"Size": true,+"Checksum": false,+"NoSlowHash": false,+"SlowHashSyncOnly": false,+"DownloadHash": false+}+INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"+INFO : Building Path1 and Path2 listings+INFO : Path1 checking for diffs+INFO : - [36mPath1[0m [35m[32mFile is new[0m[0m - [36mfile11.txt[0m+INFO : Path1: 1 changes: [32m 1 new[0m, [33m 0 modified[0m, [31m 0 deleted[0m+INFO : Path2 checking for diffs+INFO : - [34mPath2[0m [35m[32mFile is new[0m[0m - [36mfile11.txt[0m+INFO : Path2: 1 changes: [32m 1 new[0m, [33m 0 modified[0m, [31m 0 deleted[0m+INFO : Applying changes+INFO : Checking potential conflicts...+NOTICE: {path2String}: 0 differences found+NOTICE: {path2String}: 1 matching files+INFO : Finished checking the potential conflicts. %!s(<nil>)+NOTICE: - [34mWARNING[0m [35mNew or changed in both paths[0m - [36mfile11.txt[0m+INFO : Files are equal! Skipping: file11.txt+INFO : Updating listings+INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"+INFO : [32mBisync successful[0m++[36m(43) :[0m [34mtest delete file11 on Path1[0m+[36m(44) :[0m [34mdelete-file {path1/}file11.txt[0m+[36m(45) :[0m [34mbisync ignore-checksum[0m+INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m+INFO : Bisyncing with Comparison Settings:+{+"Modtime": true,+"Size": true,+"Checksum": false,+"NoSlowHash": false,+"SlowHashSyncOnly": false,+"DownloadHash": false+}+INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"+INFO : Building Path1 and Path2 listings+INFO : Path1 checking for diffs+INFO : - [36mPath1[0m [35m[31mFile was deleted[0m[0m - [36mfile11.txt[0m+INFO : Path1: 1 changes: [32m 0 new[0m, [33m 0 modified[0m, [31m 1 deleted[0m+INFO : Path2 checking for diffs+INFO : Applying changes+INFO : - [34mPath2[0m [35m[31mQueue delete[0m[0m - [36m{path2/}file11.txt[0m+INFO : - [36mPath1[0m [35mDo queued copies to[0m - [36mPath2[0m+INFO : There was nothing to transfer+INFO : Updating listings+INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"+INFO : [32mBisync successful[0mdiff --git a/cmd/bisync/testdata/test_equal_skipped/modfiles/file11.txt b/cmd/bisync/testdata/test_equal_skipped/modfiles/file11.txtnew file mode 100644index 000000000..27c89c7bc--- /dev/null+++ b/cmd/bisync/testdata/test_equal_skipped/modfiles/file11.txt@@ -0,0 +1 @@+Same on both pathsdiff --git a/cmd/bisync/testdata/test_equal_skipped/scenario.txt b/cmd/bisync/testdata/test_equal_skipped/scenario.txtindex 321469848..6bc346b63 100644--- a/cmd/bisync/testdata/test_equal_skipped/scenario.txt+++ b/cmd/bisync/testdata/test_equal_skipped/scenario.txt@@ -4,6 +4,7 @@ test equal skipped# - Changed on both paths and identical, then changed on Path2 during the sync,# keeping the same size and modtime file3 (file3B)# - New on both paths with --size-only, same size and different content file10 (file10L, file10R)+# - New on both paths with --ignore-checksum and identical file11test initial bisyncbisync resync@@ -51,3 +52,13 @@ bisync size-onlytest delete file10 on Path1delete-file {path1/}file10.txtbisync size-only++test new on both paths with --ignore-checksum and identical - file11+touch-glob 2001-05-06 {datadir/} file11.txt+copy-as {datadir/}file11.txt {path1/} file11.txt+copy-as {datadir/}file11.txt {path2/} file11.txt+bisync ignore-checksum++test delete file11 on Path1+delete-file {path1/}file11.txt+bisync ignore-checksum