##// END OF EJS Templates
debugbuilddag: build repository content in binary mode
Patrick Mezard -
r11686:fc360de6 default
parent child Browse files
Show More
@@ -890,7 +890,7 b' def debugbuilddag(ui, repo, text,'
890 # we don't want to fail in merges during buildup
890 # we don't want to fail in merges during buildup
891 os.environ['HGMERGE'] = 'internal:local'
891 os.environ['HGMERGE'] = 'internal:local'
892
892
893 def writefile(fname, text, fmode="w"):
893 def writefile(fname, text, fmode="wb"):
894 f = open(fname, fmode)
894 f = open(fname, fmode)
895 try:
895 try:
896 f.write(text)
896 f.write(text)
@@ -925,7 +925,7 b' def debugbuilddag(ui, repo, text,'
925 merge(ui, repo, node=p2)
925 merge(ui, repo, node=p2)
926
926
927 if mergeable_file:
927 if mergeable_file:
928 f = open("mf", "r+")
928 f = open("mf", "rb+")
929 try:
929 try:
930 lines = f.read().split("\n")
930 lines = f.read().split("\n")
931 lines[id * linesperrev] += " r%i" % id
931 lines[id * linesperrev] += " r%i" % id
@@ -935,7 +935,7 b' def debugbuilddag(ui, repo, text,'
935 f.close()
935 f.close()
936
936
937 if appended_file:
937 if appended_file:
938 writefile("af", "r%i\n" % id, "a")
938 writefile("af", "r%i\n" % id, "ab")
939
939
940 if overwritten_file:
940 if overwritten_file:
941 writefile("of", "r%i\n" % id)
941 writefile("of", "r%i\n" % id)
@@ -13,6 +13,8 b' cd repo'
13 hg debugbuilddag '+2:f +3:p2 @temp <f+4 @default /p2 +2' -q -oa
13 hg debugbuilddag '+2:f +3:p2 @temp <f+4 @default /p2 +2' -q -oa
14 echo -- dag
14 echo -- dag
15 hg debugdag -t -b
15 hg debugdag -t -b
16 echo -- tip
17 hg id
16 echo -- glog
18 echo -- glog
17 hg glog --template '{rev}: {desc} [{branches}] @ {date}\n'
19 hg glog --template '{rev}: {desc} [{branches}] @ {date}\n'
18 echo -- glog of
20 echo -- glog of
@@ -35,6 +37,8 b' cd repo'
35 hg debugbuilddag '+2:f +3:p2 @temp <f+4 @default /p2 +2' -q -mn
37 hg debugbuilddag '+2:f +3:p2 @temp <f+4 @default /p2 +2' -q -mn
36 echo -- dag
38 echo -- dag
37 hg debugdag -t -b
39 hg debugdag -t -b
40 echo -- tip
41 hg id
38 echo -- glog
42 echo -- glog
39 hg glog --template '{rev}: {desc} [{branches}] @ {date}\n'
43 hg glog --template '{rev}: {desc} [{branches}] @ {date}\n'
40 echo -- glog mf
44 echo -- glog mf
@@ -4,6 +4,8 b''
4 +3:p2
4 +3:p2
5 @temp*f+3
5 @temp*f+3
6 @default*/p2+2:tip
6 @default*/p2+2:tip
7 -- tip
8 f96e381c614c tip
7 -- glog
9 -- glog
8 @ 11: r11 [] @ 11.00
10 @ 11: r11 [] @ 11.00
9 |
11 |
@@ -101,6 +103,8 b' r11'
101 +3:p2
103 +3:p2
102 @temp*f+3
104 @temp*f+3
103 @default*/p2+2:tip
105 @default*/p2+2:tip
106 -- tip
107 9c5ce9b70771 tip
104 -- glog
108 -- glog
105 @ 11: r11 [] @ 11.00
109 @ 11: r11 [] @ 11.00
106 |
110 |
General Comments 0
You need to be logged in to leave comments. Login now