test-import-merge.t fails on windows, applying the patch fails directly instead of matching with an offset

Matt Mackall mpm at selenic.com
Mon Jan 20 17:09:28 CST 2014


On Mon, 2014-01-20 at 22:18 +0100, Simon Heimberg wrote:
> test-import-merge.t fails since a long time [1]. Does anybody know why
>    $ hg import --exact ../a.patch
> behaves differently on windows and on other os? The operation is aborted in both places, so the
> repo is in the same state. But why are the messages different? Looks like the patch does not
> match at all on windows. Does the patch have different line ends, a leading bom, ...?

Hmmm.

  $ hg export tip > out
  >>> apatch = open("../a.patch", "a")
  >>> apatch.write("".join(open("out").readlines()[7:]))

This "a" looks suspiciously non-portable. It's from this diff:

http://www.selenic.com/hg/diff/3193b23eec61/tests/test-import-merge.t

This change was made in August, possibly after the Windows buildbot
died. I'll add a "b" to the mode to do it in binary mode.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list