Submitter | Simon Heimberg |
---|---|
Date | Jan. 20, 2014, 9:18 p.m. |
Message ID | <52DD9298.9030603@besonet.ch> |
Download | mbox | patch |
Permalink | /patch/3395/ |
State | Accepted |
Headers | show |
Comments
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.
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?
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.
Patch
--- c:\Users\buildbot\w2k8\Windows_2008_R2_hg_tests__stable_\build\tests\test-import-merge.t +++ c:\Users\buildbot\w2k8\Windows_2008_R2_hg_tests__stable_\build\tests\test-import-merge.t.err @@ -142,10 +142,9 @@ applying ../a.patch 1 files updated, 0 files merged, 0 files removed, 0 files unresolved patching file a - Hunk #1 succeeded at 1 with fuzz 1 (offset -1 lines). - transaction abort! - rollback completed - abort: patch is damaged or loses information + Hunk #1 FAILED at 0 + 1 out of 1 hunks FAILED -- saving rejects to file a.rej + abort: patch failed to apply [255] $ hg verify checking changesets