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