Show More
@@ -358,6 +358,7 b' def updatefromremote(ui, repo, remotemar' | |||
|
358 | 358 | if ui.configbool('ui', 'quietbookmarkmove', False): |
|
359 | 359 | status = warn = ui.debug |
|
360 | 360 | |
|
361 | explicit = set(explicit) | |
|
361 | 362 | changed = [] |
|
362 | 363 | for b, scid, dcid in addsrc: |
|
363 | 364 | if scid in repo: # add remote bookmarks for changes we already have |
@@ -366,23 +367,30 b' def updatefromremote(ui, repo, remotemar' | |||
|
366 | 367 | for b, scid, dcid in advsrc: |
|
367 | 368 | changed.append((b, bin(scid), status, |
|
368 | 369 | _("updating bookmark %s\n") % (b))) |
|
370 | # remove normal movement from explicit set | |
|
371 | explicit.difference_update(d[0] for d in changed) | |
|
372 | ||
|
369 | 373 | for b, scid, dcid in diverge: |
|
370 | db = _diverge(ui, b, path, localmarks) | |
|
371 | changed.append((db, bin(scid), warn, | |
|
372 | _("divergent bookmark %s stored as %s\n") % (b, db))) | |
|
374 | if b in explicit: | |
|
375 | explicit.discard(b) | |
|
376 | changed.append((b, bin(scid), status, | |
|
377 | _("importing bookmark %s\n") % (b, b))) | |
|
378 | else: | |
|
379 | db = _diverge(ui, b, path, localmarks) | |
|
380 | changed.append((db, bin(scid), warn, | |
|
381 | _("divergent bookmark %s stored as %s\n") | |
|
382 | % (b, db))) | |
|
383 | for b, scid, dcid in adddst + advdst: | |
|
384 | if b in explicit: | |
|
385 | explicit.discard(b) | |
|
386 | changed.append((b, bin(scid), status, | |
|
387 | _("importing bookmark %s\n") % (b, b))) | |
|
388 | ||
|
373 | 389 | if changed: |
|
374 | 390 | for b, node, writer, msg in sorted(changed): |
|
375 | 391 | localmarks[b] = node |
|
376 | 392 | writer(msg) |
|
377 | 393 | localmarks.write() |
|
378 | # update specified bookmarks | |
|
379 | if explicit: | |
|
380 | marks = repo._bookmarks | |
|
381 | for b in explicit: | |
|
382 | # explicit pull overrides local bookmark if any | |
|
383 | repo.ui.status(_("importing bookmark %s\n") % b) | |
|
384 | marks[b] = repo[remotemarks[b]].node() | |
|
385 | marks.write() | |
|
386 | 394 | |
|
387 | 395 | def diff(ui, dst, src): |
|
388 | 396 | ui.status(_("searching for changed bookmarks\n")) |
@@ -61,7 +61,6 b' import bookmark by name' | |||
|
61 | 61 | $ hg pull -B X ../a |
|
62 | 62 | pulling from ../a |
|
63 | 63 | no changes found |
|
64 | importing bookmark X | |
|
65 | 64 | $ hg bookmark |
|
66 | 65 | X 0:4e3505fd9583 |
|
67 | 66 | * Y 0:4e3505fd9583 |
@@ -373,7 +372,6 b' hgweb' | |||
|
373 | 372 | adding remote bookmark Z |
|
374 | 373 | adding remote bookmark foo |
|
375 | 374 | adding remote bookmark foobar |
|
376 | importing bookmark Z | |
|
377 | 375 | $ hg clone http://localhost:$HGPORT/ cloned-bookmarks |
|
378 | 376 | requesting all changes |
|
379 | 377 | adding changesets |
@@ -906,7 +906,6 b' pull over ssh' | |||
|
906 | 906 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
907 | 907 | 1 new obsolescence markers |
|
908 | 908 | updating bookmark book_02de |
|
909 | importing bookmark book_02de | |
|
910 | 909 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
911 | 910 | $ hg -R other debugobsolete |
|
912 | 911 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
@@ -928,7 +927,6 b' pull over http' | |||
|
928 | 927 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
929 | 928 | 1 new obsolescence markers |
|
930 | 929 | updating bookmark book_42cc |
|
931 | importing bookmark book_42cc | |
|
932 | 930 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
933 | 931 | $ cat main-error.log |
|
934 | 932 | $ hg -R other debugobsolete |
@@ -200,7 +200,6 b' listkeys hook' | |||
|
200 | 200 | no changes found |
|
201 | 201 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} |
|
202 | 202 | adding remote bookmark bar |
|
203 | importing bookmark bar | |
|
204 | 203 | $ cd ../a |
|
205 | 204 | |
|
206 | 205 | test that prepushkey can prevent incoming keys |
General Comments 0
You need to be logged in to leave comments.
Login now