Mercurial > hg
changeset 11686:fc360de66217
debugbuilddag: build repository content in binary mode
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 26 Jul 2010 23:26:15 +0200 |
parents | aade8f133d11 |
children | 4f3883979e82 9df481f8036d |
files | mercurial/commands.py tests/test-debugbuilddag tests/test-debugbuilddag.out |
diffstat | 3 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Jul 26 22:29:49 2010 +0200 +++ b/mercurial/commands.py Mon Jul 26 23:26:15 2010 +0200 @@ -890,7 +890,7 @@ # we don't want to fail in merges during buildup os.environ['HGMERGE'] = 'internal:local' - def writefile(fname, text, fmode="w"): + def writefile(fname, text, fmode="wb"): f = open(fname, fmode) try: f.write(text) @@ -925,7 +925,7 @@ merge(ui, repo, node=p2) if mergeable_file: - f = open("mf", "r+") + f = open("mf", "rb+") try: lines = f.read().split("\n") lines[id * linesperrev] += " r%i" % id @@ -935,7 +935,7 @@ f.close() if appended_file: - writefile("af", "r%i\n" % id, "a") + writefile("af", "r%i\n" % id, "ab") if overwritten_file: writefile("of", "r%i\n" % id)
--- a/tests/test-debugbuilddag Mon Jul 26 22:29:49 2010 +0200 +++ b/tests/test-debugbuilddag Mon Jul 26 23:26:15 2010 +0200 @@ -13,6 +13,8 @@ hg debugbuilddag '+2:f +3:p2 @temp <f+4 @default /p2 +2' -q -oa echo -- dag hg debugdag -t -b +echo -- tip +hg id echo -- glog hg glog --template '{rev}: {desc} [{branches}] @ {date}\n' echo -- glog of @@ -35,6 +37,8 @@ hg debugbuilddag '+2:f +3:p2 @temp <f+4 @default /p2 +2' -q -mn echo -- dag hg debugdag -t -b +echo -- tip +hg id echo -- glog hg glog --template '{rev}: {desc} [{branches}] @ {date}\n' echo -- glog mf
--- a/tests/test-debugbuilddag.out Mon Jul 26 22:29:49 2010 +0200 +++ b/tests/test-debugbuilddag.out Mon Jul 26 23:26:15 2010 +0200 @@ -4,6 +4,8 @@ +3:p2 @temp*f+3 @default*/p2+2:tip +-- tip +f96e381c614c tip -- glog @ 11: r11 [] @ 11.00 | @@ -101,6 +103,8 @@ +3:p2 @temp*f+3 @default*/p2+2:tip +-- tip +9c5ce9b70771 tip -- glog @ 11: r11 [] @ 11.00 |