GnuWin32 diff3 per_merger test failures

Bug #582974 reported by Martin Packman on 2010-05-19
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Low
Unassigned

Bug Description

When using the GnuWin32 diff3 binary, but not when using /bin/diff3 from within cygwin, the following three tests fail with unexpected carriage returns at the end of each line.:

bt.per_merger.TestMergeImplementation.test_merge_move_and_change(diff3)
bt.per_merger.TestMergeImplementation.test_merge_specific_file(diff3)
bt.per_merger.TestMergeImplementation.test_modify_conflicts_with_delete(diff3)

Unlike diff, diff3 doesn't seem to have a --binary switch, so no obvious line endings fix to try there.

I expect this could cause real merge problems, but wasn't able to cook up an example.

Robert Collins (lifeless) wrote :

I wonder if we could set the fd's to binary using native windows apis before the child process gets going ?

Changed in bzr:
status: New → Confirmed
importance: Undecided → Wishlist
tags: added: win32
Gordon Tyler (doxxx) wrote :

There is a way to do it using the msvcrt module, which I used when fixing a bug a few weeks back in the way selftest --parallel=subprocess was handled on win32.

if sys.platform == "win32":
    import msvcrt
    msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)

Well, that sets it for *our* side, I mean in the spawned process side.
Might be a tad trickier there.

Alexander Belchenko (bialix) wrote :

That's why I've got those test failures on UDS!

I think we should create Feature and probe on small example that diff3 produce LF-output. And skip those tests otherwise.

Changed in bzr:
importance: Wishlist → Low
Jelmer Vernooij (jelmer) on 2017-11-09
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers