If a file is changed on both sides and the conflict names it gets renamed to (e.g. X.conflict1 and X.conflict2) were deleted on both sides since the last run, the listing update removed the just-copied conflict files again when processing the deleted-on-both queue. The rename bookkeeping then could not find them and bisync aborted with "bisync.renames: internal error: missing info". Skip names that this run copied when removing files deleted on both sides, and add a test case for the scenario.
35 lines
1.4 KiB
Plaintext
35 lines
1.4 KiB
Plaintext
test conflict reuse
|
|
# Recreate a conflicted file under its original name on both paths, delete its
|
|
# conflict copies, and make the two versions differ. The next run renames the
|
|
# file to the same conflict names that were just deleted on both paths.
|
|
|
|
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 bisync run with --conflict-resolve=none --conflict-loser=num
|
|
# result should be "file1.txt.conflict1", "file1.txt.conflict2" on both paths
|
|
bisync conflict-resolve=none conflict-loser=num conflict-suffix=conflict
|
|
|
|
test restore file1.txt on both paths, NOT identical, and delete the conflict copies
|
|
delete-file {path1/}file1.txt.conflict1
|
|
delete-file {path1/}file1.txt.conflict2
|
|
delete-file {path2/}file1.txt.conflict1
|
|
delete-file {path2/}file1.txt.conflict2
|
|
touch-glob 2002-01-02 {datadir/} file1R.txt
|
|
copy-as {datadir/}file1R.txt {path2/} file1.txt
|
|
touch-glob 2002-03-04 {datadir/} file1L.txt
|
|
copy-as {datadir/}file1L.txt {path1/} file1.txt
|
|
|
|
test bisync run reuses the deleted conflict names
|
|
# result should again be "file1.txt.conflict1", "file1.txt.conflict2" on both paths
|
|
bisync conflict-resolve=none conflict-loser=num conflict-suffix=conflict
|
|
|
|
test next bisync run has no changes
|
|
bisync
|