Show More
@@ -347,7 +347,7 b' def _diverge(ui, b, path, localmarks):' | |||
|
347 | 347 | n = '%s@%s' % (b, p) |
|
348 | 348 | return n |
|
349 | 349 | |
|
350 | def updatefromremote(ui, repo, remotemarks, path): | |
|
350 | def updatefromremote(ui, repo, remotemarks, path, explicit=()): | |
|
351 | 351 | ui.debug("checking for updated bookmarks\n") |
|
352 | 352 | localmarks = repo._bookmarks |
|
353 | 353 | (addsrc, adddst, advsrc, advdst, diverge, differ, invalid |
@@ -375,6 +375,14 b' def updatefromremote(ui, repo, remotemar' | |||
|
375 | 375 | localmarks[b] = node |
|
376 | 376 | writer(msg) |
|
377 | 377 | 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() | |
|
378 | 386 | |
|
379 | 387 | def diff(ui, dst, src): |
|
380 | 388 | ui.status(_("searching for changed bookmarks\n")) |
@@ -1014,18 +1014,8 b' def _pullbookmarks(pullop):' | |||
|
1014 | 1014 | repo = pullop.repo |
|
1015 | 1015 | remotebookmarks = pullop.remotebookmarks |
|
1016 | 1016 | bookmod.updatefromremote(repo.ui, repo, remotebookmarks, |
|
1017 |
pullop.remote.url() |
|
|
1018 | # update specified bookmarks | |
|
1019 | if pullop.explicitbookmarks: | |
|
1020 | marks = repo._bookmarks | |
|
1021 | writer = repo.ui.status | |
|
1022 | if repo.ui.configbool('ui', 'quietbookmarkmove', False): | |
|
1023 | writer = repo.ui.debug | |
|
1024 | for b in pullop.explicitbookmarks: | |
|
1025 | # explicit pull overrides local bookmark if any | |
|
1026 | writer(_("importing bookmark %s\n") % b) | |
|
1027 | marks[b] = repo[remotebookmarks[b]].node() | |
|
1028 | marks.write() | |
|
1017 | pullop.remote.url(), | |
|
1018 | explicit=pullop.explicitbookmarks) | |
|
1029 | 1019 | |
|
1030 | 1020 | def _pullobsolete(pullop): |
|
1031 | 1021 | """utility function to pull obsolete markers from a remote |
General Comments 0
You need to be logged in to leave comments.
Login now