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

Matt Mackall mpm at selenic.com
Tue Apr 15 10:50:19 CDT 2014


On Mon, 2014-04-14 at 00:38 -0400, Pierre-Yves David wrote:
> 
> 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?

I fixed it a while ago.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list