##// END OF EJS Templates
update: consider successor changesets when moving active bookmark...
Sean Farley -
r20281:67ee87a3 default
parent child Browse files
Show More
@@ -192,13 +192,12 b' def update(repo, parents, node):'
192 return False
192 return False
193
193
194 if marks[cur] in parents:
194 if marks[cur] in parents:
195 old = repo[marks[cur]]
196 new = repo[node]
195 new = repo[node]
197 divs = [repo[b] for b in marks
196 divs = [repo[b] for b in marks
198 if b.split('@', 1)[0] == cur.split('@', 1)[0]]
197 if b.split('@', 1)[0] == cur.split('@', 1)[0]]
199 anc = repo.changelog.ancestors([new.rev()])
198 anc = repo.changelog.ancestors([new.rev()])
200 deletefrom = [b.node() for b in divs if b.rev() in anc or b == new]
199 deletefrom = [b.node() for b in divs if b.rev() in anc or b == new]
201 if old.descendant(new):
200 if validdest(repo, repo[marks[cur]], new):
202 marks[cur] = new.node()
201 marks[cur] = new.node()
203 update = True
202 update = True
204
203
@@ -229,13 +229,16 b' the bookmark (issue4015)'
229 $ hg bookmarks
229 $ hg bookmarks
230 * bm 5:ff252e8273df
230 * bm 5:ff252e8273df
231
231
232 Test that 4 is detected as the no-argument destination from 3
232 Test that 4 is detected as the no-argument destination from 3 and also moves
233 the bookmark with it
233 $ hg up --quiet 0 # we should be able to update to 3 directly
234 $ hg up --quiet 0 # we should be able to update to 3 directly
234 $ hg up --quiet --hidden 3 # but not implemented yet.
235 $ hg up --quiet --hidden 3 # but not implemented yet.
236 $ hg book -f bm
235 $ hg up
237 $ hg up
236 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
238 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
237 $ hg id
239 updating bookmark bm
238 d047485b3896+ (b1)
240 $ hg book
241 * bm 4:d047485b3896
239
242
240 Test that 5 is detected as a valid destination from 1
243 Test that 5 is detected as a valid destination from 1
241 $ hg up --quiet 0 # we should be able to update to 3 directly
244 $ hg up --quiet 0 # we should be able to update to 3 directly
General Comments 0
You need to be logged in to leave comments. Login now