Show More
@@ -376,7 +376,7 b' class localrepository(repo.repository):' | |||||
376 | f = self.opener("branches.cache") |
|
376 | f = self.opener("branches.cache") | |
377 | lines = f.read().split('\n') |
|
377 | lines = f.read().split('\n') | |
378 | f.close() |
|
378 | f.close() | |
379 |
last, lrev = lines.pop(0). |
|
379 | last, lrev = lines.pop(0).split(" ", 1) | |
380 | last, lrev = bin(last), int(lrev) |
|
380 | last, lrev = bin(last), int(lrev) | |
381 | if not (lrev < self.changelog.count() and |
|
381 | if not (lrev < self.changelog.count() and | |
382 | self.changelog.node(lrev) == last): # sanity check |
|
382 | self.changelog.node(lrev) == last): # sanity check | |
@@ -384,8 +384,8 b' class localrepository(repo.repository):' | |||||
384 | raise ValueError('Invalid branch cache: unknown tip') |
|
384 | raise ValueError('Invalid branch cache: unknown tip') | |
385 | for l in lines: |
|
385 | for l in lines: | |
386 | if not l: continue |
|
386 | if not l: continue | |
387 |
node, label = l. |
|
387 | node, label = l.split(" ", 1) | |
388 | partial[label] = bin(node) |
|
388 | partial[label.strip()] = bin(node) | |
389 | except (KeyboardInterrupt, util.SignalInterrupt): |
|
389 | except (KeyboardInterrupt, util.SignalInterrupt): | |
390 | raise |
|
390 | raise | |
391 | except Exception, inst: |
|
391 | except Exception, inst: | |
@@ -407,8 +407,7 b' class localrepository(repo.repository):' | |||||
407 | for r in xrange(start, end): |
|
407 | for r in xrange(start, end): | |
408 | c = self.changectx(r) |
|
408 | c = self.changectx(r) | |
409 | b = c.branch() |
|
409 | b = c.branch() | |
410 | if b: |
|
410 | partial[b] = c.node() | |
411 | partial[b] = c.node() |
|
|||
412 |
|
411 | |||
413 | def lookup(self, key): |
|
412 | def lookup(self, key): | |
414 | if key == '.': |
|
413 | if key == '.': |
@@ -1,6 +1,7 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init |
|
3 | hg init | |
|
4 | hg branch dummy # needed so -r "" doesn't point to the unnamed/default branch | |||
4 | touch a |
|
5 | touch a | |
5 | hg add a |
|
6 | hg add a | |
6 | hg ci -m "a" -d "1000000 0" |
|
7 | hg ci -m "a" -d "1000000 0" |
@@ -1,19 +1,19 b'' | |||||
1 | diff -r acd8075edac9 b |
|
1 | diff -r 4da5fa99f904 b | |
2 | --- /dev/null |
|
2 | --- /dev/null | |
3 | +++ b/b |
|
3 | +++ b/b | |
4 | @@ -0,0 +1,1 @@ |
|
4 | @@ -0,0 +1,1 @@ | |
5 | +123 |
|
5 | +123 | |
6 | diff -r acd8075edac9 b |
|
6 | diff -r 4da5fa99f904 b | |
7 | --- /dev/null |
|
7 | --- /dev/null | |
8 | +++ b/b |
|
8 | +++ b/b | |
9 | @@ -0,0 +1,1 @@ |
|
9 | @@ -0,0 +1,1 @@ | |
10 | +123 |
|
10 | +123 | |
11 | diff -r acd8075edac9 a |
|
11 | diff -r 4da5fa99f904 a | |
12 | --- a/a |
|
12 | --- a/a | |
13 | +++ b/a |
|
13 | +++ b/a | |
14 | @@ -0,0 +1,1 @@ |
|
14 | @@ -0,0 +1,1 @@ | |
15 | +foo |
|
15 | +foo | |
16 | diff -r acd8075edac9 b |
|
16 | diff -r 4da5fa99f904 b | |
17 | --- /dev/null |
|
17 | --- /dev/null | |
18 | +++ b/b |
|
18 | +++ b/b | |
19 | @@ -0,0 +1,1 @@ |
|
19 | @@ -0,0 +1,1 @@ |
@@ -126,10 +126,13 b' tip 5:db5' | |||||
126 | é 3:770b9b11621d |
|
126 | é 3:770b9b11621d | |
127 | % ascii |
|
127 | % ascii | |
128 | ? 5:db5520b4645f |
|
128 | ? 5:db5520b4645f | |
|
129 | 4:9cff3c980b58 | |||
129 | % latin-1 |
|
130 | % latin-1 | |
130 | � 5:db5520b4645f |
|
131 | � 5:db5520b4645f | |
|
132 | 4:9cff3c980b58 | |||
131 | % utf-8 |
|
133 | % utf-8 | |
132 | é 5:db5520b4645f |
|
134 | é 5:db5520b4645f | |
|
135 | 4:9cff3c980b58 | |||
133 | % utf-8 |
|
136 | % utf-8 | |
134 | changeset: 5:db5520b4645f |
|
137 | changeset: 5:db5520b4645f | |
135 | branch: é |
|
138 | branch: é |
@@ -47,6 +47,7 b' hg log -pv d' | |||||
47 | # log --follow tests |
|
47 | # log --follow tests | |
48 | hg init ../follow |
|
48 | hg init ../follow | |
49 | cd ../follow |
|
49 | cd ../follow | |
|
50 | hg branch dummy # needed so -r "" doesn't point to the unnamed/default branch | |||
50 | echo base > base |
|
51 | echo base > base | |
51 | hg ci -Ambase -d '1 0' |
|
52 | hg ci -Ambase -d '1 0' | |
52 |
|
53 |
@@ -105,19 +105,22 b' adding base' | |||||
105 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
105 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
106 | adding b1 |
|
106 | adding b1 | |
107 | % log -f |
|
107 | % log -f | |
108 |
changeset: 3: |
|
108 | changeset: 3:07a62f044f0d | |
|
109 | branch: dummy | |||
109 | tag: tip |
|
110 | tag: tip | |
110 |
parent: 1: |
|
111 | parent: 1:fb3d4e35b279 | |
111 | user: test |
|
112 | user: test | |
112 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
113 | date: Thu Jan 01 00:00:01 1970 +0000 | |
113 | summary: b1 |
|
114 | summary: b1 | |
114 |
|
115 | |||
115 |
changeset: 1: |
|
116 | changeset: 1:fb3d4e35b279 | |
|
117 | branch: dummy | |||
116 | user: test |
|
118 | user: test | |
117 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
119 | date: Thu Jan 01 00:00:01 1970 +0000 | |
118 | summary: r1 |
|
120 | summary: r1 | |
119 |
|
121 | |||
120 |
changeset: 0: |
|
122 | changeset: 0:ea445bfed6b9 | |
|
123 | branch: dummy | |||
121 | user: test |
|
124 | user: test | |
122 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
125 | date: Thu Jan 01 00:00:01 1970 +0000 | |
123 | summary: base |
|
126 | summary: base | |
@@ -125,18 +128,21 b' summary: base' | |||||
125 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
128 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
126 | adding b2 |
|
129 | adding b2 | |
127 | % log -f -r 1:tip |
|
130 | % log -f -r 1:tip | |
128 |
changeset: 1: |
|
131 | changeset: 1:fb3d4e35b279 | |
|
132 | branch: dummy | |||
129 | user: test |
|
133 | user: test | |
130 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
134 | date: Thu Jan 01 00:00:01 1970 +0000 | |
131 | summary: r1 |
|
135 | summary: r1 | |
132 |
|
136 | |||
133 |
changeset: 2: |
|
137 | changeset: 2:e8882cbc828c | |
|
138 | branch: dummy | |||
134 | user: test |
|
139 | user: test | |
135 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
140 | date: Thu Jan 01 00:00:01 1970 +0000 | |
136 | summary: r2 |
|
141 | summary: r2 | |
137 |
|
142 | |||
138 |
changeset: 3: |
|
143 | changeset: 3:07a62f044f0d | |
139 | parent: 1:3d5bf5654eda |
|
144 | branch: dummy | |
|
145 | parent: 1:fb3d4e35b279 | |||
140 | user: test |
|
146 | user: test | |
141 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
147 | date: Thu Jan 01 00:00:01 1970 +0000 | |
142 | summary: b1 |
|
148 | summary: b1 | |
@@ -145,57 +151,66 b' 2 files updated, 0 files merged, 1 files' | |||||
145 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
151 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
146 | (branch merge, don't forget to commit) |
|
152 | (branch merge, don't forget to commit) | |
147 | % log --follow-first |
|
153 | % log --follow-first | |
148 |
changeset: 6: |
|
154 | changeset: 6:0f621dafa603 | |
|
155 | branch: dummy | |||
149 | tag: tip |
|
156 | tag: tip | |
150 | user: test |
|
157 | user: test | |
151 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
158 | date: Thu Jan 01 00:00:01 1970 +0000 | |
152 | summary: b1.1 |
|
159 | summary: b1.1 | |
153 |
|
160 | |||
154 |
changeset: 5: |
|
161 | changeset: 5:0cf53fb6dfd5 | |
155 | parent: 3:e62f78d544b4 |
|
162 | branch: dummy | |
156 | parent: 4:ddb82e70d1a1 |
|
163 | parent: 3:07a62f044f0d | |
|
164 | parent: 4:b76598590bc3 | |||
157 | user: test |
|
165 | user: test | |
158 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
166 | date: Thu Jan 01 00:00:01 1970 +0000 | |
159 | summary: m12 |
|
167 | summary: m12 | |
160 |
|
168 | |||
161 |
changeset: 3: |
|
169 | changeset: 3:07a62f044f0d | |
162 | parent: 1:3d5bf5654eda |
|
170 | branch: dummy | |
|
171 | parent: 1:fb3d4e35b279 | |||
163 | user: test |
|
172 | user: test | |
164 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
173 | date: Thu Jan 01 00:00:01 1970 +0000 | |
165 | summary: b1 |
|
174 | summary: b1 | |
166 |
|
175 | |||
167 |
changeset: 1: |
|
176 | changeset: 1:fb3d4e35b279 | |
|
177 | branch: dummy | |||
168 | user: test |
|
178 | user: test | |
169 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
179 | date: Thu Jan 01 00:00:01 1970 +0000 | |
170 | summary: r1 |
|
180 | summary: r1 | |
171 |
|
181 | |||
172 |
changeset: 0: |
|
182 | changeset: 0:ea445bfed6b9 | |
|
183 | branch: dummy | |||
173 | user: test |
|
184 | user: test | |
174 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
185 | date: Thu Jan 01 00:00:01 1970 +0000 | |
175 | summary: base |
|
186 | summary: base | |
176 |
|
187 | |||
177 | % log -P 2 |
|
188 | % log -P 2 | |
178 |
changeset: 6: |
|
189 | changeset: 6:0f621dafa603 | |
|
190 | branch: dummy | |||
179 | tag: tip |
|
191 | tag: tip | |
180 | user: test |
|
192 | user: test | |
181 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
193 | date: Thu Jan 01 00:00:01 1970 +0000 | |
182 | summary: b1.1 |
|
194 | summary: b1.1 | |
183 |
|
195 | |||
184 |
changeset: 5: |
|
196 | changeset: 5:0cf53fb6dfd5 | |
185 | parent: 3:e62f78d544b4 |
|
197 | branch: dummy | |
186 | parent: 4:ddb82e70d1a1 |
|
198 | parent: 3:07a62f044f0d | |
|
199 | parent: 4:b76598590bc3 | |||
187 | user: test |
|
200 | user: test | |
188 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
201 | date: Thu Jan 01 00:00:01 1970 +0000 | |
189 | summary: m12 |
|
202 | summary: m12 | |
190 |
|
203 | |||
191 |
changeset: 4: |
|
204 | changeset: 4:b76598590bc3 | |
192 | parent: 0:67e992f2c4f3 |
|
205 | branch: dummy | |
|
206 | parent: 0:ea445bfed6b9 | |||
193 | user: test |
|
207 | user: test | |
194 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
208 | date: Thu Jan 01 00:00:01 1970 +0000 | |
195 | summary: b2 |
|
209 | summary: b2 | |
196 |
|
210 | |||
197 |
changeset: 3: |
|
211 | changeset: 3:07a62f044f0d | |
198 | parent: 1:3d5bf5654eda |
|
212 | branch: dummy | |
|
213 | parent: 1:fb3d4e35b279 | |||
199 | user: test |
|
214 | user: test | |
200 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
215 | date: Thu Jan 01 00:00:01 1970 +0000 | |
201 | summary: b1 |
|
216 | summary: b1 |
@@ -43,8 +43,10 b' date: Mon Jan 12 13:46:40 1970 +0' | |||||
43 | summary: initial |
|
43 | summary: initial | |
44 |
|
44 | |||
45 | foo 5:5f8fb06e083e |
|
45 | foo 5:5f8fb06e083e | |
|
46 | 3:bf1bc2f45e83 | |||
46 | bar 2:67ec16bde7f1 |
|
47 | bar 2:67ec16bde7f1 | |
47 | foo |
|
48 | foo | |
|
49 | ||||
48 | bar |
|
50 | bar | |
49 | % test for invalid branch cache |
|
51 | % test for invalid branch cache | |
50 | rolling back last transaction |
|
52 | rolling back last transaction | |
@@ -73,5 +75,6 b' modify a branch' | |||||
73 |
|
75 | |||
74 | 4:4909a3732169 |
|
76 | 4:4909a3732169 | |
75 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4 |
|
77 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4 | |
|
78 | bf1bc2f45e834c75404d0ddab57d53beab56e2f8 | |||
76 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo |
|
79 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo | |
77 | 67ec16bde7f1575d523313b9bca000f6a6f12dca bar |
|
80 | 67ec16bde7f1575d523313b9bca000f6a6f12dca bar |
General Comments 0
You need to be logged in to leave comments.
Login now