##// END OF EJS Templates
pull: gather explicit bookmark pulls with bookmark updates...
Pierre-Yves David -
r22658:a8f0d8e4 default
parent child Browse files
Show More
@@ -347,7 +347,7 b' def _diverge(ui, b, path, localmarks):'
347 n = '%s@%s' % (b, p)
347 n = '%s@%s' % (b, p)
348 return n
348 return n
349
349
350 def updatefromremote(ui, repo, remotemarks, path):
350 def updatefromremote(ui, repo, remotemarks, path, explicit=()):
351 ui.debug("checking for updated bookmarks\n")
351 ui.debug("checking for updated bookmarks\n")
352 localmarks = repo._bookmarks
352 localmarks = repo._bookmarks
353 (addsrc, adddst, advsrc, advdst, diverge, differ, invalid
353 (addsrc, adddst, advsrc, advdst, diverge, differ, invalid
@@ -375,6 +375,14 b' def updatefromremote(ui, repo, remotemar'
375 localmarks[b] = node
375 localmarks[b] = node
376 writer(msg)
376 writer(msg)
377 localmarks.write()
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 def diff(ui, dst, src):
387 def diff(ui, dst, src):
380 ui.status(_("searching for changed bookmarks\n"))
388 ui.status(_("searching for changed bookmarks\n"))
@@ -1014,18 +1014,8 b' def _pullbookmarks(pullop):'
1014 repo = pullop.repo
1014 repo = pullop.repo
1015 remotebookmarks = pullop.remotebookmarks
1015 remotebookmarks = pullop.remotebookmarks
1016 bookmod.updatefromremote(repo.ui, repo, remotebookmarks,
1016 bookmod.updatefromremote(repo.ui, repo, remotebookmarks,
1017 pullop.remote.url())
1017 pullop.remote.url(),
1018 # update specified bookmarks
1018 explicit=pullop.explicitbookmarks)
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()
1029
1019
1030 def _pullobsolete(pullop):
1020 def _pullobsolete(pullop):
1031 """utility function to pull obsolete markers from a remote
1021 """utility function to pull obsolete markers from a remote
General Comments 0
You need to be logged in to leave comments. Login now