[Bug 473776] New: wiggle: various bugs
https://bugzilla.novell.com/show_bug.cgi?id=473776 Summary: wiggle: various bugs Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: nfbrown@novell.com ReportedBy: agruen@novell.com QAContact: qa@suse.de Found By: --- Given enough context in a diff, I would expect "wiggle -m c ab.diff" to produce similar results as "diff3 -m c a b". This is not always the case; sometimes, wiggle produces nonsense. I will include three cases here, and attach a test case (run with http://savannah.nongnu.org/projects/shrun). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=473776
User agruen@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=473776#c1
--- Comment #1 from Andreas Gruenbacher
<<<<<<< c c ||||||| a a ======= b
>> b
This conflict is not being reported: $ $WIGGLE -m -q c ab.diff
c
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=473776
User agruen@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=473776#c2
--- Comment #2 from Andreas Gruenbacher
1 2 <<<<<<< c 3c 4c 5c ||||||| a 3 4a 5 ======= 3 4b 5
>> b 6 7
Markers in the wrong places: $ $WIGGLE -m -q c ab.diff 2>/dev/null
1 2 3c <<<<<<< 4c ||||||| 4a ======= 4b
>> 5c 6 7
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=473776
User agruen@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=473776#c3
--- Comment #3 from Andreas Gruenbacher
<<<<<<< c 1c 2c 3c 4c 5c 6c 7c ||||||| a 1 2 3 4a 5 6 7 ======= 1 2 3 4b 5 6 7
>> b
Total nonsense: $ $WIGGLE -m -q c ab.diff 2>/dev/null
1c <<<<<<< 2c 3c 4c 5c 6c 7c ||||||| 4a 5 6 7 ======= 4b 5 6 7
>>
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=473776
User agruen@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=473776#c4
--- Comment #4 from Andreas Gruenbacher
https://bugzilla.novell.com/show_bug.cgi?id=473776
User nfbrown@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=473776#c5
Neil Brown
https://bugzilla.novell.com/show_bug.cgi?id=473776
User nfbrown@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=473776#c6
--- Comment #6 from Neil Brown
https://bugzilla.novell.com/show_bug.cgi?id=473776
User agruen@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=473776#c7
--- Comment #7 from Andreas Gruenbacher
The second example I think is correct. Fair enough, there are (at least) two strategies to handle differences in context lines. If wiggle is supposed to ignore such differences, then the result is correct.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=473776
User agruen@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=473776#c8
--- Comment #8 from Andreas Gruenbacher
1 2 <<<<<<< c 3c ||||||| a 3 ======= 3b
>> b 4 5 <<<<<<< a 6 ======= 6bc >> b 7 8
I find this rather irritating because it's not immediately obvious what the proposed merge result is: the second file is shown below ||| in the first conflict, but below <<< in the second; the proposed merge result (?) is shown below <<< in the first and below === in the second conflict. To make the format easier to read, my best idea so far is to change the order in which files are shown so that the proposed merge result always comes last, e.g., <<<<<<< a original version ||||||| b new version in patch ======= merge result
>
or <<<<<<< a original version ======= merge result == new version in patch
> b
Wiggle handles the apply-apply situation more gracefully than diff3: $ wiggle -m c ab.diff
1 2 <<<<<<< 3c ||||||| 3 ======= 3b
>> 4 5 6bc 7 8 1 unresolved conflict found 1 already-applied change ignored
I'm not sure whether it is generally safe to ignore apply-apply conflicts; I'm leaning towards marking them. (Similar to my preference for at least optionally marking differences in context.) Any thoughts? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com