From 5ca61ab70543abf740999b874ed65ec3ffc890cf Mon Sep 17 00:00:00 2001 From: nielash Date: Tue, 11 Jul 2023 05:33:31 -0400 Subject: [PATCH] bisync: equality check before renaming (leave identical files alone) Improved detection of false positive change conflicts (identical files are now left alone instead of renamed) https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=1.%20Identical%20files%20should%20be%20left%20alone%2C%20even%20if%20new/newer/changed%20on%20both%20sides --- cmd/bisync/deltas.go | 81 +++++++++++++++++++ .../_testdir_path1.._testdir_path2.path1.lst | 4 +- ...estdir_path1.._testdir_path2.path1.lst-new | 2 +- .../_testdir_path1.._testdir_path2.path2.lst | 4 +- ...estdir_path1.._testdir_path2.path2.lst-new | 2 +- .../testdata/test_changes/golden/test.log | 5 ++ .../testdata/test_changes/modfiles/file5L.txt | 2 +- .../testdata/test_changes/modfiles/file5R.txt | 2 +- .../_testdir_path1.._testdir_path2.path1.lst | 4 +- ...estdir_path1.._testdir_path2.path1.lst-dry | 2 +- ...ir_path1.._testdir_path2.path1.lst-dry-new | 2 +- ...estdir_path1.._testdir_path2.path1.lst-new | 2 +- .../_testdir_path1.._testdir_path2.path2.lst | 4 +- ...estdir_path1.._testdir_path2.path2.lst-dry | 2 +- ...ir_path1.._testdir_path2.path2.lst-dry-new | 2 +- ...estdir_path1.._testdir_path2.path2.lst-new | 2 +- ...estdir_path1.._testdir_path2.path1.lst-dry | 2 +- ...ir_path1.._testdir_path2.path1.lst-dry-new | 2 +- ...estdir_path1.._testdir_path2.path2.lst-dry | 2 +- ...ir_path1.._testdir_path2.path2.lst-dry-new | 2 +- ...estdir_path1.._testdir_path2.path1.lst-dry | 2 +- ...ir_path1.._testdir_path2.path1.lst-dry-new | 2 +- ...estdir_path1.._testdir_path2.path2.lst-dry | 2 +- ...ir_path1.._testdir_path2.path2.lst-dry-new | 2 +- .../testdata/test_dry_run/golden/test.log | 16 +++- .../testdata/test_dry_run/modfiles/file5L.txt | 2 +- .../testdata/test_dry_run/modfiles/file5R.txt | 2 +- ...testdir_path1.._testdir_path2.copy1to2.que | 1 + ...testdir_path1.._testdir_path2.copy2to1.que | 1 + .../_testdir_path1.._testdir_path2.path1.lst | 5 ++ ...estdir_path1.._testdir_path2.path1.lst-new | 4 + .../_testdir_path1.._testdir_path2.path2.lst | 5 ++ ...estdir_path1.._testdir_path2.path2.lst-new | 4 + .../testdata/test_equal/golden/test.log | 52 ++++++++++++ .../testdata/test_equal/initial/RCLONE_TEST | 1 + .../testdata/test_equal/initial/file1.txt | 0 .../testdata/test_equal/initial/file2.txt | 0 .../testdata/test_equal/modfiles/file1L.txt | 1 + .../testdata/test_equal/modfiles/file1R.txt | 1 + .../testdata/test_equal/modfiles/file2.txt | 1 + cmd/bisync/testdata/test_equal/scenario.txt | 22 +++++ .../_testdir_path1.._testdir_path2.path1.lst | 2 +- .../_testdir_path1.._testdir_path2.path2.lst | 2 +- ...estdir_path1.._testdir_path2.path2.lst-new | 2 +- .../test_extended_filenames/golden/test.log | 48 ++++++----- .../modfiles/file2.txt | 1 + .../test_extended_filenames/scenario.txt | 3 +- docs/content/bisync.md | 29 +++++-- 48 files changed, 279 insertions(+), 64 deletions(-) create mode 100644 cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.copy1to2.que create mode 100644 cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.copy2to1.que create mode 100644 cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path1.lst create mode 100644 cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path1.lst-new create mode 100644 cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path2.lst create mode 100644 cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path2.lst-new create mode 100644 cmd/bisync/testdata/test_equal/golden/test.log create mode 100644 cmd/bisync/testdata/test_equal/initial/RCLONE_TEST create mode 100644 cmd/bisync/testdata/test_equal/initial/file1.txt create mode 100644 cmd/bisync/testdata/test_equal/initial/file2.txt create mode 100644 cmd/bisync/testdata/test_equal/modfiles/file1L.txt create mode 100644 cmd/bisync/testdata/test_equal/modfiles/file1R.txt create mode 100644 cmd/bisync/testdata/test_equal/modfiles/file2.txt create mode 100644 cmd/bisync/testdata/test_equal/scenario.txt create mode 100644 cmd/bisync/testdata/test_extended_filenames/modfiles/file2.txt diff --git a/cmd/bisync/deltas.go b/cmd/bisync/deltas.go index d1dee1a1d..c79f62483 100644 --- a/cmd/bisync/deltas.go +++ b/cmd/bisync/deltas.go @@ -3,13 +3,18 @@ package bisync import ( + "bytes" "context" "fmt" "path/filepath" "sort" + "strings" "github.com/rclone/rclone/cmd/bisync/bilib" + "github.com/rclone/rclone/cmd/check" "github.com/rclone/rclone/fs" + "github.com/rclone/rclone/fs/accounting" + "github.com/rclone/rclone/fs/filter" "github.com/rclone/rclone/fs/operations" ) @@ -90,6 +95,46 @@ func (ds *deltaSet) printStats() { ds.msg, nAll, nNew, nNewer, nOlder, nDeleted) } +// check potential conflicts (to avoid renaming if already identical) +func (b *bisyncRun) checkconflicts(ctxCheck context.Context, filterCheck *filter.Filter, fs1, fs2 fs.Fs) (bilib.Names, error) { + matches := bilib.Names{} + if filterCheck.HaveFilesFrom() { + fs.Debugf(nil, "There are potential conflicts to check.") + + opt, close, checkopterr := check.GetCheckOpt(b.fs1, b.fs2) + if checkopterr != nil { + b.critical = true + fs.Debugf(nil, "GetCheckOpt error: %v", checkopterr) + return matches, checkopterr + } + defer close() + + opt.Match = new(bytes.Buffer) + + // TODO: consider using custom CheckFn to act like cryptcheck, if either fs is a crypt remote and -c has been passed + // note that cryptCheck() is not currently exported + + fs.Infof(nil, "Checking potential conflicts...") + check := operations.Check(ctxCheck, opt) + fs.Infof(nil, "Finished checking the potential conflicts. %s", check) + + //reset error count, because we don't want to count check errors as bisync errors + accounting.Stats(ctxCheck).ResetErrors() + + //return the list of identical files to check against later + if len(fmt.Sprint(opt.Match)) > 0 { + matches = bilib.ToNames(strings.Split(fmt.Sprint(opt.Match), "\n")) + } + if matches.NotEmpty() { + fs.Debugf(nil, "The following potential conflicts were determined to be identical. %v", matches) + } else { + fs.Debugf(nil, "None of the conflicts were determined to be identical.") + } + + } + return matches, nil +} + // findDeltas func (b *bisyncRun) findDeltas(fctx context.Context, f fs.Fs, oldListing, newListing, msg string) (ds *deltaSet, err error) { var old, now *fileList @@ -183,6 +228,34 @@ func (b *bisyncRun) applyDeltas(ctx context.Context, ds1, ds2 *deltaSet) (change ctxMove := b.opt.setDryRun(ctx) + // build a list of only the "deltaOther"s so we don't have to check more files than necessary + // this is essentially the same as running rclone check with a --files-from filter, then exempting the --match results from being renamed + // we therefore avoid having to list the same directory more than once. + + // we are intentionally overriding DryRun here because we need to perform the check, even during a dry run, or the results would be inaccurate. + // check is a read-only operation by its nature, so it's already "dry" in that sense. + ctxNew, ciCheck := fs.AddConfig(ctx) + ciCheck.DryRun = false + + ctxCheck, filterCheck := filter.AddConfig(ctxNew) + + for _, file := range ds1.sort() { + d1 := ds1.deltas[file] + if d1.is(deltaOther) { + d2 := ds2.deltas[file] + if d2.is(deltaOther) { + if err := filterCheck.AddFile(file); err != nil { + fs.Debugf(nil, "Non-critical error adding file to list of potential conflicts to check: %s", err) + } else { + fs.Debugf(nil, "Added file to list of potential conflicts to check: %s", file) + } + } + } + } + + //if there are potential conflicts to check, check them all here (outside the loop) in one fell swoop + matches, err := b.checkconflicts(ctxCheck, filterCheck, b.fs1, b.fs2) + for _, file := range ds1.sort() { p1 := path1 + file p2 := path2 + file @@ -199,6 +272,13 @@ func (b *bisyncRun) applyDeltas(ctx context.Context, ds1, ds2 *deltaSet) (change handled.Add(file) } else if d2.is(deltaOther) { b.indent("!WARNING", file, "New or changed in both paths") + + //if files are identical, leave them alone instead of renaming + equal := matches.Has(file) + if equal { + fs.Infof(nil, "Files are equal! Skipping: %s", file) + } else { + fs.Debugf(nil, "Files are NOT equal: %s", file) b.indent("!Path1", p1+"..path1", "Renaming Path1 copy") if err = operations.MoveFile(ctxMove, b.fs1, b.fs1, file+"..path1", file); err != nil { err = fmt.Errorf("path1 rename failed for %s: %w", p1, err) @@ -215,6 +295,7 @@ func (b *bisyncRun) applyDeltas(ctx context.Context, ds1, ds2 *deltaSet) (change } b.indent("!Path2", p1+"..path2", "Queue copy to Path1") copy2to1.Add(file + "..path2") + } handled.Add(file) } } else { diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst index 49142c3e6..ddb01f4a7 100644 --- a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst @@ -4,7 +4,7 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst-new index 239afb58c..8ea562aab 100644 --- a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst-new +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst index 49142c3e6..ddb01f4a7 100644 --- a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst @@ -4,7 +4,7 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst-new index 377ac6a2a..ba1b8daab 100644 --- a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst-new +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/test.log b/cmd/bisync/testdata/test_changes/golden/test.log index 1b314688d..222b29758 100644 --- a/cmd/bisync/testdata/test_changes/golden/test.log +++ b/cmd/bisync/testdata/test_changes/golden/test.log @@ -68,6 +68,11 @@ INFO : - Path2 File was deleted - file7.txt INFO : - Path2 File was deleted - file8.txt INFO : Path2: 7 changes: 1 new, 3 newer, 0 older, 3 deleted INFO : Applying changes +INFO : Checking potential conflicts... +ERROR : file5.txt: md5 differ +NOTICE: Local file system at {path2}: 1 differences found +NOTICE: Local file system at {path2}: 1 errors while checking +INFO : Finished checking the potential conflicts. 1 differences found INFO : - Path1 Queue copy to Path2 - {path2/}file11.txt INFO : - Path1 Queue copy to Path2 - {path2/}file2.txt INFO : - Path2 Queue delete - {path2/}file4.txt diff --git a/cmd/bisync/testdata/test_changes/modfiles/file5L.txt b/cmd/bisync/testdata/test_changes/modfiles/file5L.txt index 464147f09..43ceff1db 100644 --- a/cmd/bisync/testdata/test_changes/modfiles/file5L.txt +++ b/cmd/bisync/testdata/test_changes/modfiles/file5L.txt @@ -1 +1 @@ -This file is newer +This file is newer and not equal to 5R diff --git a/cmd/bisync/testdata/test_changes/modfiles/file5R.txt b/cmd/bisync/testdata/test_changes/modfiles/file5R.txt index 464147f09..a928fcf13 100644 --- a/cmd/bisync/testdata/test_changes/modfiles/file5R.txt +++ b/cmd/bisync/testdata/test_changes/modfiles/file5R.txt @@ -1 +1 @@ -This file is newer +This file is newer and not equal to 5L diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst index 49142c3e6..ddb01f4a7 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst @@ -4,7 +4,7 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry index 239afb58c..8ea562aab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry-new index 239afb58c..8ea562aab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry-new +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry-new @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-new index 239afb58c..8ea562aab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-new +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst index 49142c3e6..ddb01f4a7 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst @@ -4,7 +4,7 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry index 377ac6a2a..ba1b8daab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry-new index 377ac6a2a..ba1b8daab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry-new +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry-new @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-new index 377ac6a2a..ba1b8daab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-new +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry index 239afb58c..8ea562aab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry-new index 239afb58c..8ea562aab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry-new +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry-new @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry index 377ac6a2a..ba1b8daab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry-new index 377ac6a2a..ba1b8daab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry-new +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry-new @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry index 239afb58c..8ea562aab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry-new index 239afb58c..8ea562aab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry-new +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry-new @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" - 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 39 md5:0860a03592626642f8fd6c8bfb447d2a - 2001-03-04T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry index 377ac6a2a..ba1b8daab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry-new index 377ac6a2a..ba1b8daab 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry-new +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry-new @@ -4,5 +4,5 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" - 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 39 md5:979a803b15d27df0c31ad7d29006d10b - 2001-01-02T00:00:00.000000000+0000 "file5.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/test.log b/cmd/bisync/testdata/test_dry_run/golden/test.log index 2efdb1f81..cb3f8d263 100644 --- a/cmd/bisync/testdata/test_dry_run/golden/test.log +++ b/cmd/bisync/testdata/test_dry_run/golden/test.log @@ -59,7 +59,7 @@ NOTICE: file11.txt: Skipped copy as --dry-run is set (size 19) NOTICE: file2.txt: Skipped copy as --dry-run is set (size 13) NOTICE: file3.txt: Skipped copy as --dry-run is set (size 0) NOTICE: file4.txt: Skipped delete as --dry-run is set (size 0) -NOTICE: file5.txt: Skipped copy (or update modification time) as --dry-run is set (size 19) +NOTICE: file5.txt: Skipped copy (or update modification time) as --dry-run is set (size 39) NOTICE: file6.txt: Skipped delete as --dry-run is set (size 19) NOTICE: file7.txt: Skipped copy as --dry-run is set (size 19) INFO : Resync updating listings @@ -86,15 +86,20 @@ INFO : - Path2 File was deleted - file3.txt INFO : - Path2 File was deleted - file7.txt INFO : Path2: 6 changes: 1 new, 3 newer, 0 older, 2 deleted INFO : Applying changes +INFO : Checking potential conflicts... +ERROR : file5.txt: md5 differ +NOTICE: Local file system at {path2}: 1 differences found +NOTICE: Local file system at {path2}: 1 errors while checking +INFO : Finished checking the potential conflicts. 1 differences found INFO : - Path1 Queue copy to Path2 - {path2/}file11.txt INFO : - Path1 Queue copy to Path2 - {path2/}file2.txt INFO : - Path2 Queue delete - {path2/}file4.txt NOTICE: - WARNING New or changed in both paths - file5.txt NOTICE: - Path1 Renaming Path1 copy - {path1/}file5.txt..path1 -NOTICE: file5.txt: Skipped move as --dry-run is set (size 19) +NOTICE: file5.txt: Skipped move as --dry-run is set (size 39) NOTICE: - Path1 Queue copy to Path2 - {path2/}file5.txt..path1 NOTICE: - Path2 Renaming Path2 copy - {path2/}file5.txt..path2 -NOTICE: file5.txt: Skipped move as --dry-run is set (size 19) +NOTICE: file5.txt: Skipped move as --dry-run is set (size 39) NOTICE: - Path2 Queue copy to Path1 - {path1/}file5.txt..path2 INFO : - Path2 Queue copy to Path1 - {path1/}file6.txt INFO : - Path1 Queue copy to Path2 - {path2/}file7.txt @@ -137,6 +142,11 @@ INFO : - Path2 File was deleted - file3.txt INFO : - Path2 File was deleted - file7.txt INFO : Path2: 6 changes: 1 new, 3 newer, 0 older, 2 deleted INFO : Applying changes +INFO : Checking potential conflicts... +ERROR : file5.txt: md5 differ +NOTICE: Local file system at {path2}: 1 differences found +NOTICE: Local file system at {path2}: 1 errors while checking +INFO : Finished checking the potential conflicts. 1 differences found INFO : - Path1 Queue copy to Path2 - {path2/}file11.txt INFO : - Path1 Queue copy to Path2 - {path2/}file2.txt INFO : - Path2 Queue delete - {path2/}file4.txt diff --git a/cmd/bisync/testdata/test_dry_run/modfiles/file5L.txt b/cmd/bisync/testdata/test_dry_run/modfiles/file5L.txt index 464147f09..43ceff1db 100644 --- a/cmd/bisync/testdata/test_dry_run/modfiles/file5L.txt +++ b/cmd/bisync/testdata/test_dry_run/modfiles/file5L.txt @@ -1 +1 @@ -This file is newer +This file is newer and not equal to 5R diff --git a/cmd/bisync/testdata/test_dry_run/modfiles/file5R.txt b/cmd/bisync/testdata/test_dry_run/modfiles/file5R.txt index 464147f09..a928fcf13 100644 --- a/cmd/bisync/testdata/test_dry_run/modfiles/file5R.txt +++ b/cmd/bisync/testdata/test_dry_run/modfiles/file5R.txt @@ -1 +1 @@ -This file is newer +This file is newer and not equal to 5L diff --git a/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.copy1to2.que new file mode 100644 index 000000000..d988a5ab1 --- /dev/null +++ b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.copy1to2.que @@ -0,0 +1 @@ +"file1.txt..path1" diff --git a/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.copy2to1.que b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.copy2to1.que new file mode 100644 index 000000000..7f99cd1ce --- /dev/null +++ b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.copy2to1.que @@ -0,0 +1 @@ +"file1.txt..path2" diff --git a/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..8ef63fed8 --- /dev/null +++ b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 33 md5:ea683c03f780b76a62405456b08ae6fd - 2001-03-04T00:00:00.000000000+0000 "file1.txt..path1" +- 33 md5:2b4975bb20f7be674e66d78570ba2fb1 - 2001-01-02T00:00:00.000000000+0000 "file1.txt..path2" +- 37 md5:9fe822ddd1cb81d83aae00fa48239bd3 - 2001-01-02T00:00:00.000000000+0000 "file2.txt" diff --git a/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..eb2bbe4cf --- /dev/null +++ b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,4 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 33 md5:ea683c03f780b76a62405456b08ae6fd - 2001-03-04T00:00:00.000000000+0000 "file1.txt" +- 37 md5:9fe822ddd1cb81d83aae00fa48239bd3 - 2001-01-02T00:00:00.000000000+0000 "file2.txt" diff --git a/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..8ef63fed8 --- /dev/null +++ b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 33 md5:ea683c03f780b76a62405456b08ae6fd - 2001-03-04T00:00:00.000000000+0000 "file1.txt..path1" +- 33 md5:2b4975bb20f7be674e66d78570ba2fb1 - 2001-01-02T00:00:00.000000000+0000 "file1.txt..path2" +- 37 md5:9fe822ddd1cb81d83aae00fa48239bd3 - 2001-01-02T00:00:00.000000000+0000 "file2.txt" diff --git a/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..8bea8b845 --- /dev/null +++ b/cmd/bisync/testdata/test_equal/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,4 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 33 md5:2b4975bb20f7be674e66d78570ba2fb1 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 37 md5:9fe822ddd1cb81d83aae00fa48239bd3 - 2001-01-02T00:00:00.000000000+0000 "file2.txt" diff --git a/cmd/bisync/testdata/test_equal/golden/test.log b/cmd/bisync/testdata/test_equal/golden/test.log new file mode 100644 index 000000000..34cffc037 --- /dev/null +++ b/cmd/bisync/testdata/test_equal/golden/test.log @@ -0,0 +1,52 @@ +(01) : test equal + + +(02) : test initial bisync +(03) : bisync resync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Copying unique Path2 files to Path1 +INFO : Resynching Path1 to Path2 +INFO : Resync updating listings +INFO : Bisync successful + +(04) : test changed on both paths and NOT identical - file1 (file1R, file1L) +(05) : touch-glob 2001-01-02 {datadir/} file1R.txt +(06) : copy-as {datadir/}file1R.txt {path2/} file1.txt +(07) : touch-glob 2001-03-04 {datadir/} file1L.txt +(08) : copy-as {datadir/}file1L.txt {path1/} file1.txt + +(09) : test changed on both paths and identical - file2 +(10) : touch-glob 2001-01-02 {datadir/} file2.txt +(11) : copy-as {datadir/}file2.txt {path1/} file2.txt +(12) : copy-as {datadir/}file2.txt {path2/} file2.txt + +(13) : test bisync run +(14) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File is newer - file1.txt +INFO : - Path1 File is newer - file2.txt +INFO : Path1: 2 changes: 0 new, 2 newer, 0 older, 0 deleted +INFO : Path2 checking for diffs +INFO : - Path2 File is newer - file1.txt +INFO : - Path2 File is newer - file2.txt +INFO : Path2: 2 changes: 0 new, 2 newer, 0 older, 0 deleted +INFO : Applying changes +INFO : Checking potential conflicts... +ERROR : file1.txt: md5 differ +NOTICE: Local file system at {path2}: 1 differences found +NOTICE: Local file system at {path2}: 1 errors while checking +NOTICE: Local file system at {path2}: 1 matching files +INFO : Finished checking the potential conflicts. 1 differences found +NOTICE: - WARNING New or changed in both paths - file1.txt +NOTICE: - Path1 Renaming Path1 copy - {path1/}file1.txt..path1 +NOTICE: - Path1 Queue copy to Path2 - {path2/}file1.txt..path1 +NOTICE: - Path2 Renaming Path2 copy - {path2/}file1.txt..path2 +NOTICE: - Path2 Queue copy to Path1 - {path1/}file1.txt..path2 +NOTICE: - WARNING New or changed in both paths - file2.txt +INFO : Files are equal! Skipping: file2.txt +INFO : - Path2 Do queued copies to - Path1 +INFO : - Path1 Do queued copies to - Path2 +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_equal/initial/RCLONE_TEST b/cmd/bisync/testdata/test_equal/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_equal/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_equal/initial/file1.txt b/cmd/bisync/testdata/test_equal/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_equal/initial/file2.txt b/cmd/bisync/testdata/test_equal/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_equal/modfiles/file1L.txt b/cmd/bisync/testdata/test_equal/modfiles/file1L.txt new file mode 100644 index 000000000..6906ccb09 --- /dev/null +++ b/cmd/bisync/testdata/test_equal/modfiles/file1L.txt @@ -0,0 +1 @@ +This file is NOT identical to 1R diff --git a/cmd/bisync/testdata/test_equal/modfiles/file1R.txt b/cmd/bisync/testdata/test_equal/modfiles/file1R.txt new file mode 100644 index 000000000..e49d06a94 --- /dev/null +++ b/cmd/bisync/testdata/test_equal/modfiles/file1R.txt @@ -0,0 +1 @@ +This file is NOT identical to 1L diff --git a/cmd/bisync/testdata/test_equal/modfiles/file2.txt b/cmd/bisync/testdata/test_equal/modfiles/file2.txt new file mode 100644 index 000000000..2ee5fc1ee --- /dev/null +++ b/cmd/bisync/testdata/test_equal/modfiles/file2.txt @@ -0,0 +1 @@ +This file is identical on both sides diff --git a/cmd/bisync/testdata/test_equal/scenario.txt b/cmd/bisync/testdata/test_equal/scenario.txt new file mode 100644 index 000000000..86fd26aca --- /dev/null +++ b/cmd/bisync/testdata/test_equal/scenario.txt @@ -0,0 +1,22 @@ +test equal +# Check that changed files on both sides are renamed ONLY if not-identical +# See: https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=1.%20Identical%20files%20should%20be%20left%20alone%2C%20even%20if%20new/newer/changed%20on%20both%20sides +# - Changed on Path2 and on Path1, and NOT identical file1 (file1r, file1l) +# - Changed on Path2 and on Path1, and identical file2 + +test initial bisync +bisync resync + +test changed on both paths and NOT identical - file1 (file1R, file1L) +touch-glob 2001-01-02 {datadir/} file1R.txt +copy-as {datadir/}file1R.txt {path2/} file1.txt +touch-glob 2001-03-04 {datadir/} file1L.txt +copy-as {datadir/}file1L.txt {path1/} file1.txt + +test changed on both paths and identical - file2 +touch-glob 2001-01-02 {datadir/} file2.txt +copy-as {datadir/}file2.txt {path1/} file2.txt +copy-as {datadir/}file2.txt {path2/} file2.txt + +test bisync run +bisync diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path1.lst index 60009c3fc..2d9313ea4 100644 --- a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path1.lst +++ b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path1.lst @@ -12,7 +12,7 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_rawchars_␙_\x81_\xfe/file3_␙_\x81_\xfe" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/file_with_測試_.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-03T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path1" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2" +- 42 md5:40b811fb5009223b6da573f169619d8e - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2" - 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_p2s.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/mañana_funcionará.txt" diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst index 60009c3fc..2d9313ea4 100644 --- a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst +++ b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst @@ -12,7 +12,7 @@ - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_rawchars_␙_\x81_\xfe/file3_␙_\x81_\xfe" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/file_with_測試_.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-03T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path1" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2" +- 42 md5:40b811fb5009223b6da573f169619d8e - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2" - 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_p2s.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/mañana_funcionará.txt" diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst-new index 5f3e1c9f1..850de84a6 100644 --- a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst-new +++ b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -8,7 +8,7 @@ - 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ě_.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir with␊white space.txt/file2 with␊white space.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_rawchars_␙_\x81_\xfe/file3_␙_\x81_\xfe" -- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt" +- 42 md5:40b811fb5009223b6da573f169619d8e - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt" - 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_p2s.txt" - 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "Русский.txt" diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/test.log b/cmd/bisync/testdata/test_extended_filenames/golden/test.log index 9aef61002..5a7f6412a 100644 --- a/cmd/bisync/testdata/test_extended_filenames/golden/test.log +++ b/cmd/bisync/testdata/test_extended_filenames/golden/test.log @@ -12,30 +12,31 @@ INFO : Bisync successful (04) : test place a newer files on both paths (05) : touch-glob 2001-01-02 {datadir/} file1.txt -(06) : copy-as {datadir/}file1.txt {path2/} New_top_level_mañana_funcionará.txt -(07) : copy-as {datadir/}file1.txt {path2/} file_enconde_mañana_funcionará.txt -(08) : copy-as {datadir/}file1.txt {path1/} filename_contains_ࢺ_p1m.txt -(09) : copy-as {datadir/}file1.txt {path2/} Русский.txt -(10) : copy-as {datadir/}file1.txt {path1/} file1_with{spc}white{spc}space.txt -(11) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ test.txt -(12) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ mañana_funcionará.txt -(13) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ file_with_測試_.txt -(14) : copy-as {datadir/}file1.txt {path2/}subdir_with_ࢺ_ filename_contains_ࢺ_p2s.txt -(15) : copy-as {datadir/}file1.txt {path2/}subdir{spc}with{eol}white{spc}space.txt file2{spc}with{eol}white{spc}space.txt -(16) : copy-as {datadir/}file1.txt {path2/}subdir_rawchars_{chr:19}_{chr:81}_{chr:fe} file3_{chr:19}_{chr:81}_{chr:fe} +(06) : touch-glob 2001-01-02 {datadir/} file2.txt +(07) : copy-as {datadir/}file1.txt {path2/} New_top_level_mañana_funcionará.txt +(08) : copy-as {datadir/}file1.txt {path2/} file_enconde_mañana_funcionará.txt +(09) : copy-as {datadir/}file1.txt {path1/} filename_contains_ࢺ_p1m.txt +(10) : copy-as {datadir/}file1.txt {path2/} Русский.txt +(11) : copy-as {datadir/}file1.txt {path1/} file1_with{spc}white{spc}space.txt +(12) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ test.txt +(13) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ mañana_funcionará.txt +(14) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ file_with_測試_.txt +(15) : copy-as {datadir/}file1.txt {path2/}subdir_with_ࢺ_ filename_contains_ࢺ_p2s.txt +(16) : copy-as {datadir/}file1.txt {path2/}subdir{spc}with{eol}white{spc}space.txt file2{spc}with{eol}white{spc}space.txt +(17) : copy-as {datadir/}file1.txt {path2/}subdir_rawchars_{chr:19}_{chr:81}_{chr:fe} file3_{chr:19}_{chr:81}_{chr:fe} -(17) : test place a new file on both paths -(18) : copy-as {datadir/}file1.txt {path2/}subdir_with_ࢺ_ filechangedbothpaths_ࢺ_.txt -(19) : touch-glob 2001-01-03 {datadir/} file1.txt -(20) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ filechangedbothpaths_ࢺ_.txt +(18) : test place a new file on both paths +(19) : copy-as {datadir/}file2.txt {path2/}subdir_with_ࢺ_ filechangedbothpaths_ࢺ_.txt +(20) : touch-glob 2001-01-03 {datadir/} file1.txt +(21) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ filechangedbothpaths_ࢺ_.txt -(21) : test delete files on both paths -(22) : delete-file {path2/}filename_contains_ࢺ_.txt -(23) : delete-file {path2/}subdir_with_ࢺ_/filename_contains_ě_.txt -(24) : delete-file {path1/}Русский.txt +(22) : test delete files on both paths +(23) : delete-file {path2/}filename_contains_ࢺ_.txt +(24) : delete-file {path2/}subdir_with_ࢺ_/filename_contains_ě_.txt +(25) : delete-file {path1/}Русский.txt -(25) : test bisync run -(26) : bisync +(26) : test bisync run +(27) : bisync INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" INFO : Path1 checking for diffs INFO : - Path1 File is new - file1_with white space.txt @@ -58,6 +59,11 @@ INFO : - Path2 File was deleted - filename_contains_ࢺ_. INFO : - Path2 File was deleted - subdir_with_ࢺ_/filename_contains_ě_.txt INFO : Path2: 9 changes: 5 new, 2 newer, 0 older, 2 deleted INFO : Applying changes +INFO : Checking potential conflicts... +ERROR : subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt: sizes differ +NOTICE: Local file system at {path2}: 1 differences found +NOTICE: Local file system at {path2}: 1 errors while checking +INFO : Finished checking the potential conflicts. 1 differences found INFO : - Path1 Queue copy to Path2 - {path2/}file1_with white space.txt INFO : - Path1 Queue copy to Path2 - {path2/}filename_contains_ࢺ_p1m.txt INFO : - Path1 Queue copy to Path2 - {path2/}subdir_with_ࢺ_/file_with_測試_.txt diff --git a/cmd/bisync/testdata/test_extended_filenames/modfiles/file2.txt b/cmd/bisync/testdata/test_extended_filenames/modfiles/file2.txt new file mode 100644 index 000000000..76f450b35 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/modfiles/file2.txt @@ -0,0 +1 @@ +This file is newer and not equal to file1 diff --git a/cmd/bisync/testdata/test_extended_filenames/scenario.txt b/cmd/bisync/testdata/test_extended_filenames/scenario.txt index 7c722720a..774f5db8f 100644 --- a/cmd/bisync/testdata/test_extended_filenames/scenario.txt +++ b/cmd/bisync/testdata/test_extended_filenames/scenario.txt @@ -16,6 +16,7 @@ bisync resync test place a newer files on both paths # force specific modification time since file time is lost through git touch-glob 2001-01-02 {datadir/} file1.txt +touch-glob 2001-01-02 {datadir/} file2.txt copy-as {datadir/}file1.txt {path2/} New_top_level_mañana_funcionará.txt copy-as {datadir/}file1.txt {path2/} file_enconde_mañana_funcionará.txt copy-as {datadir/}file1.txt {path1/} filename_contains_ࢺ_p1m.txt @@ -29,7 +30,7 @@ copy-as {datadir/}file1.txt {path2/}subdir{spc}with{eol}white{spc}space.txt file copy-as {datadir/}file1.txt {path2/}subdir_rawchars_{chr:19}_{chr:81}_{chr:fe} file3_{chr:19}_{chr:81}_{chr:fe} test place a new file on both paths -copy-as {datadir/}file1.txt {path2/}subdir_with_ࢺ_ filechangedbothpaths_ࢺ_.txt +copy-as {datadir/}file2.txt {path2/}subdir_with_ࢺ_ filechangedbothpaths_ࢺ_.txt touch-glob 2001-01-03 {datadir/} file1.txt copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ filechangedbothpaths_ࢺ_.txt diff --git a/docs/content/bisync.md b/docs/content/bisync.md index 3ad5bedd8..6c0d7fa86 100644 --- a/docs/content/bisync.md +++ b/docs/content/bisync.md @@ -298,12 +298,23 @@ Path1 deleted | File no longer exists on Path1 | File is deleted Type | Description | Result | Implementation --------------------------------|---------------------------------------|------------------------------------|----------------------- -Path1 new AND Path2 new | File is new on Path1 AND new on Path2 | Files renamed to _Path1 and _Path2 | `rclone copy` _Path2 file to Path1, `rclone copy` _Path1 file to Path2 -Path2 newer AND Path1 changed | File is newer on Path2 AND also changed (newer/older/size) on Path1 | Files renamed to _Path1 and _Path2 | `rclone copy` _Path2 file to Path1, `rclone copy` _Path1 file to Path2 +Path1 new/changed AND Path2 new/changed AND Path1 == Path2 | File is new/changed on Path1 AND new/changed on Path2 AND Path1 version is currently identical to Path2 | No change | None +Path1 new AND Path2 new | File is new on Path1 AND new on Path2 (and Path1 version is NOT identical to Path2) | Files renamed to _Path1 and _Path2 | `rclone copy` _Path2 file to Path1, `rclone copy` _Path1 file to Path2 +Path2 newer AND Path1 changed | File is newer on Path2 AND also changed (newer/older/size) on Path1 (and Path1 version is NOT identical to Path2) | Files renamed to _Path1 and _Path2 | `rclone copy` _Path2 file to Path1, `rclone copy` _Path1 file to Path2 Path2 newer AND Path1 deleted | File is newer on Path2 AND also deleted on Path1 | Path2 version survives | `rclone copy` Path2 to Path1 Path2 deleted AND Path1 changed | File is deleted on Path2 AND changed (newer/older/size) on Path1 | Path1 version survives |`rclone copy` Path1 to Path2 Path1 deleted AND Path2 changed | File is deleted on Path1 AND changed (newer/older/size) on Path2 | Path2 version survives | `rclone copy` Path2 to Path1 +As of `rclone v1.64`, bisync is now better at detecting *false positive* sync conflicts, +which would previously have resulted in unnecessary renames and duplicates. +Now, when bisync comes to a file that it wants to rename (because it is new/changed on both sides), +it first checks whether the Path1 and Path2 versions are currently *identical* +(using the same underlying function as [`check`](commands/rclone_check/).) +If bisync concludes that the files are identical, it will skip them and move on. +Otherwise, it will create renamed `..Path1` and `..Path2` duplicates, as before. +This behavior also [improves the experience of renaming directories](https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=Renamed%20directories), +as a `--resync` is no longer required, so long as the same change has been made on both sides. + ### All files changed check {#all-files-changed} if _all_ prior existing files on either of the filesystems have changed @@ -426,14 +437,14 @@ rclone copy PATH2 PATH2 --filter "+ */" --filter "- **" --create-empty-src-dirs ### Renamed directories -Renaming a folder on the Path1 side results is deleting all files on +Renaming a folder on the Path1 side results in deleting all files on the Path2 side and then copying all files again from Path1 to Path2. Bisync sees this as all files in the old directory name as deleted and all -files in the new directory name as new. Similarly, renaming a directory on -both sides to the same name will result in creating `..path1` and `..path2` -files on both sides. -Currently the most effective and efficient method of renaming a directory -is to rename it on both sides, then do a `--resync`. +files in the new directory name as new. +Currently, the most effective and efficient method of renaming a directory +is to rename it to the same name on both sides. (As of `rclone v1.64`, +a `--resync` is no longer required after doing so, as bisync will automatically +detect that Path1 and Path2 are in agreement.) ### Case sensitivity @@ -1121,3 +1132,5 @@ causing dry runs to inadvertently commit filter changes * `--check-access` is now enforced during `--resync`, preventing data loss in [certain user error scenarios](https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=%2D%2Dcheck%2Daccess%20doesn%27t%20always%20fail%20when%20it%20should) * Fixed an [issue](https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=5.%20Bisync%20reads%20files%20in%20excluded%20directories%20during%20delete%20operations) causing bisync to consider more files than necessary due to overbroad filters during delete operations +* [Improved detection of false positive change conflicts](https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=1.%20Identical%20files%20should%20be%20left%20alone%2C%20even%20if%20new/newer/changed%20on%20both%20sides) +(identical files are now left alone instead of renamed)