GnuWin32 diff3 per_merger test failures

Bug #582974 reported by Martin Packman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
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.

Revision history for this message
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
Revision history for this message
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)

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 582974] Re: GnuWin32 diff3 per_merger test failures

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

Revision history for this message
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)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.