##// END OF EJS Templates
pull: perform bookmark updates in the transaction
Pierre-Yves David -
r22666:0f8120c1 default
parent child Browse files
Show More
@@ -357,7 +357,7 b' def _diverge(ui, b, path, localmarks):'
357 n = '%s@%s' % (b, p)
357 n = '%s@%s' % (b, p)
358 return n
358 return n
359
359
360 def updatefromremote(ui, repo, remotemarks, path, explicit=()):
360 def updatefromremote(ui, repo, remotemarks, path, trfunc, explicit=()):
361 ui.debug("checking for updated bookmarks\n")
361 ui.debug("checking for updated bookmarks\n")
362 localmarks = repo._bookmarks
362 localmarks = repo._bookmarks
363 (addsrc, adddst, advsrc, advdst, diverge, differ, invalid
363 (addsrc, adddst, advsrc, advdst, diverge, differ, invalid
@@ -397,10 +397,11 b' def updatefromremote(ui, repo, remotemar'
397 _("importing bookmark %s\n") % (b, b)))
397 _("importing bookmark %s\n") % (b, b)))
398
398
399 if changed:
399 if changed:
400 tr = trfunc()
400 for b, node, writer, msg in sorted(changed):
401 for b, node, writer, msg in sorted(changed):
401 localmarks[b] = node
402 localmarks[b] = node
402 writer(msg)
403 writer(msg)
403 localmarks.write()
404 localmarks.recordchange(tr)
404
405
405 def diff(ui, dst, src):
406 def diff(ui, dst, src):
406 ui.status(_("searching for changed bookmarks\n"))
407 ui.status(_("searching for changed bookmarks\n"))
@@ -1015,6 +1015,7 b' def _pullbookmarks(pullop):'
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 pullop.gettransaction,
1018 explicit=pullop.explicitbookmarks)
1019 explicit=pullop.explicitbookmarks)
1019
1020
1020 def _pullobsolete(pullop):
1021 def _pullobsolete(pullop):
General Comments 0
You need to be logged in to leave comments. Login now