[PATCH 1 of 2] localrepo: do not update bookmarks in addchangegroup
dsp at php.net
dsp at php.net
Mon Mar 14 17:08:27 CDT 2011
# HG changeset patch
# User David Soria Parra <dsp at php.net>
# Date 1300132435 -3600
# Node ID 9e09f07b9e3e3cab16da217f31da3208bd74693c
# Parent 914d258be172d4d5ad3c9e0816d657c6e1100edd
localrepo: do not update bookmarks in addchangegroup
We want to update the current bookmark to the most recent revision on
current branch unless there is a remote bookmark that points to
a different descendant. Addchangegroup is called before we can check for
remote bookmarks.
We don't update the bookmark in addchangegroup anymore to allow proper updating
of bookmarks in pull.
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1894,10 +1894,6 @@
self.hook("incoming", node=hex(cl.node(i)),
source=srctype, url=url)
- # FIXME - why does this care about tip?
- if newheads == oldheads:
- bookmarks.update(self, self.dirstate.parents(), self['tip'].node())
-
# never return 0 here:
if newheads < oldheads:
return newheads - oldheads - 1
diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -26,6 +26,7 @@
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
+ updating bookmark Y
(run 'hg update' to get a working copy)
$ hg bookmarks
Y 0:4e3505fd9583
More information about the Mercurial-devel
mailing list