comparison mercurial/exchange.py @ 22658:a8f0d8e4c80a

pull: gather explicit bookmark pulls with bookmark updates There is no reason to make them at different times. So we gather them. This is the first step toward merging them.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sun, 28 Sep 2014 13:43:31 -0700
parents c9276945eba3
children 0f8120c1ecf5
comparison
equal deleted inserted replaced
22657:f4e39ceb064a 22658:a8f0d8e4c80a
1012 return 1012 return
1013 pullop.todosteps.remove('bookmarks') 1013 pullop.todosteps.remove('bookmarks')
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
1032 1022
1033 The `gettransaction` is function that return the pull transaction, creating 1023 The `gettransaction` is function that return the pull transaction, creating