Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 13646:31eac42d9123
bookmarks: separate bookmarks update code from localrepo's pull.
We explicitly want to update bookmarks from a remote. This will avoid
duplicate calls to listkeys if we clone (which calls pull) and keep
bookmark related code together.
author | David Soria Parra <dsp@php.net> |
---|---|
date | Mon, 14 Mar 2011 00:10:43 +0100 |
parents | 919174c0aaff |
children | 80d6e1f63ed9 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sun Mar 13 14:35:17 2011 +0100 +++ b/mercurial/localrepo.py Mon Mar 14 00:10:43 2011 +0100 @@ -1346,27 +1346,6 @@ finally: lock.release() - self.ui.debug("checking for updated bookmarks\n") - rb = remote.listkeys('bookmarks') - changed = False - 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.rev() >= cr.rev(): - continue - if cr in cl.descendants(): - self._bookmarks[k] = cr.node() - changed = True - self.ui.status(_("updating bookmark %s\n") % k) - else: - self.ui.warn(_("not updating divergent" - " bookmark %s\n") % k) - if changed: - bookmarks.write(self) - return result def checkpush(self, force, revs):