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

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Apr 13 23:38:28 CDT 2014



On 01/20/2014 06:09 PM, Matt Mackall wrote:
> 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.

anything needs to be done about this patch or should we consider the 
case closed?


More information about the Mercurial-devel mailing list