Skip to content
Snippets Groups Projects
Commit e291c039 authored by Matt Mackall's avatar Matt Mackall
Browse files

bookmarks: update known bookmarks on the target on push

parent 306fef84
No related branches found
No related tags found
No related merge requests found
......@@ -310,6 +310,28 @@
return result
def push(self, remote, force=False, revs=None, newbranch=False):
result = super(bookmark_repo, self).push(remote, force, revs,
newbranch)
self.ui.debug("checking for updated bookmarks\n")
rb = remote.listkeys('bookmarks')
for k in rb.keys():
if k in self._bookmarks:
nr, nl = rb[k], self._bookmarks[k]
if nr in self:
cr = self[nr]
cl = self[nl]
if cl in cr.descendants():
r = remote.pushkey('bookmarks', k, nr, nl)
if r:
self.ui.status(_("updating bookmark %s\n") % k)
else:
self.ui.warn(_("failed to update bookmark"
" %s!\n") % k)
return result
def addchangegroup(self, source, srctype, url, emptyok=False):
parents = self.dirstate.parents()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment