9c96c13a35
Before this change, --resync was handled in three steps, and needed to do a lot of unnecessary work to implement its own --ignore-existing logic, which also caused problems with unicode normalization, in addition to being pretty slow. After this change, it is refactored to produce the same result much more efficiently, by reducing the three steps to two and letting ci.IgnoreExisting do the work instead of reinventing the wheel. The behavior and sync order remain unchanged for now -- just faster (but see the ongoing lively discussions about potential future changes in #5681!)
7.6 KiB
7.6 KiB
(01) : test extended-filenames
(02) : test initial bisync
(03) : bisync resync
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
INFO : Copying unique Path2 files to Path1
INFO : - Path2 Resync is copying UNIQUE files to - Path1
INFO : - Path1 Resync is copying UNIQUE OR DIFFERING files to - Path2
INFO : Resync updating listings
INFO : Bisync successful
(04) : test place a newer files on both paths
(05) : touch-glob 2001-01-02 {datadir/} file1.txt
(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}
(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
(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
(26) : test bisync run
(27) : bisync
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
INFO : Building Path1 and Path2 listings
INFO : Path1 checking for diffs
INFO : - Path1 File was deleted - Русский.txt
INFO : - Path1 File is new - file1_with white space.txt
INFO : - Path1 File is new - filename_contains_ࢺ_p1m.txt
INFO : - Path1 File is new - subdir_with_ࢺ_/file_with_測試_.txt
INFO : - Path1 File is new - subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt
INFO : - Path1 File is new - subdir_with_ࢺ_/mañana_funcionará.txt
INFO : - Path1 File is new - subdir_with_ࢺ_/test.txt
INFO : Path1: 7 changes: 6 new, 0 newer, 0 older, 1 deleted
INFO : Path2 checking for diffs
INFO : - Path2 File is newer - file_enconde_mañana_funcionará.txt
INFO : - Path2 File was deleted - filename_contains_ࢺ_.txt
INFO : - Path2 File was deleted - subdir_with_ࢺ_/filename_contains_ě_.txt
INFO : - Path2 File is newer - Русский.txt
INFO : - Path2 File is new - New_top_level_mañana_funcionará.txt
INFO : - Path2 File is new - subdir with␊white space.txt/file2 with␊white space.txt
INFO : - Path2 File is new - "subdir_rawchars_␙_\x81_\xfe/file3_␙_\x81_\xfe"
INFO : - Path2 File is new - subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt
INFO : - Path2 File is new - subdir_with_ࢺ_/filename_contains_ࢺ_p2s.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
NOTICE: - WARNING New or changed in both paths - subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt
NOTICE: - Path1 Renaming Path1 copy - {path1/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path1
NOTICE: - Path1 Queue copy to Path2 - {path2/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path1
NOTICE: - Path2 Renaming Path2 copy - {path2/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2
NOTICE: - Path2 Queue copy to Path1 - {path1/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2
INFO : - Path1 Queue copy to Path2 - {path2/}subdir_with_ࢺ_/mañana_funcionará.txt
INFO : - Path1 Queue copy to Path2 - {path2/}subdir_with_ࢺ_/test.txt
INFO : - Path2 Queue copy to Path1 - {path1/}Русский.txt
INFO : - Path2 Queue copy to Path1 - {path1/}New_top_level_mañana_funcionará.txt
INFO : - Path2 Queue copy to Path1 - {path1/}file_enconde_mañana_funcionará.txt
INFO : - Path1 Queue delete - {path1/}filename_contains_ࢺ_.txt
INFO : - Path2 Queue copy to Path1 - {path1/}subdir with␊white space.txt/file2 with␊white space.txt
INFO : - Path2 Queue copy to Path1 - "{path1/}subdir_rawchars_␙_\x81_\xfe/file3_␙_\x81_\xfe"
INFO : - Path1 Queue delete - {path1/}subdir_with_ࢺ_/filename_contains_ě_.txt
INFO : - Path2 Queue copy to Path1 - {path1/}subdir_with_ࢺ_/filename_contains_ࢺ_p2s.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
(02) : test initial bisync
(03) : bisync resync
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
INFO : Copying unique Path2 files to Path1
INFO : - Path2 Resync is copying UNIQUE files to - Path1
INFO : - Path1 Resync is copying UNIQUE OR DIFFERING files to - Path2
INFO : Resync updating listings
INFO : Bisync successful
(04) : test place a newer files on both paths
(05) : touch-glob 2001-01-02 {datadir/} file1.txt
(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}
(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
(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
(26) : test bisync run
(27) : bisync
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
INFO : Building Path1 and Path2 listings
INFO : Path1 checking for diffs
INFO : - Path1 File was deleted - Русский.txt
INFO : - Path1 File is new - file1_with white space.txt
INFO : - Path1 File is new - filename_contains_ࢺ_p1m.txt
INFO : - Path1 File is new - subdir_with_ࢺ_/file_with_測試_.txt
INFO : - Path1 File is new - subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt
INFO : - Path1 File is new - subdir_with_ࢺ_/mañana_funcionará.txt
INFO : - Path1 File is new - subdir_with_ࢺ_/test.txt
INFO : Path1: 7 changes: 6 new, 0 newer, 0 older, 1 deleted
INFO : Path2 checking for diffs
INFO : - Path2 File is newer - file_enconde_mañana_funcionará.txt
INFO : - Path2 File was deleted - filename_contains_ࢺ_.txt
INFO : - Path2 File was deleted - subdir_with_ࢺ_/filename_contains_ě_.txt
INFO : - Path2 File is newer - Русский.txt
INFO : - Path2 File is new - New_top_level_mañana_funcionará.txt
INFO : - Path2 File is new - subdir with␊white space.txt/file2 with␊white space.txt
INFO : - Path2 File is new - "subdir_rawchars_␙_\x81_\xfe/file3_␙_\x81_\xfe"
INFO : - Path2 File is new - subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt
INFO : - Path2 File is new - subdir_with_ࢺ_/filename_contains_ࢺ_p2s.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
NOTICE: - WARNING New or changed in both paths - subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt
NOTICE: - Path1 Renaming Path1 copy - {path1/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path1
NOTICE: - Path1 Queue copy to Path2 - {path2/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path1
NOTICE: - Path2 Renaming Path2 copy - {path2/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2
NOTICE: - Path2 Queue copy to Path1 - {path1/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2
INFO : - Path1 Queue copy to Path2 - {path2/}subdir_with_ࢺ_/mañana_funcionará.txt
INFO : - Path1 Queue copy to Path2 - {path2/}subdir_with_ࢺ_/test.txt
INFO : - Path2 Queue copy to Path1 - {path1/}Русский.txt
INFO : - Path2 Queue copy to Path1 - {path1/}New_top_level_mañana_funcionará.txt
INFO : - Path2 Queue copy to Path1 - {path1/}file_enconde_mañana_funcionará.txt
INFO : - Path1 Queue delete - {path1/}filename_contains_ࢺ_.txt
INFO : - Path2 Queue copy to Path1 - {path1/}subdir with␊white space.txt/file2 with␊white space.txt
INFO : - Path2 Queue copy to Path1 - "{path1/}subdir_rawchars_␙_\x81_\xfe/file3_␙_\x81_\xfe"
INFO : - Path1 Queue delete - {path1/}subdir_with_ࢺ_/filename_contains_ě_.txt
INFO : - Path2 Queue copy to Path1 - {path1/}subdir_with_ࢺ_/filename_contains_ࢺ_p2s.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