Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 13662:80d6e1f63ed9
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.
author | David Soria Parra <dsp@php.net> |
---|---|
date | Mon, 14 Mar 2011 20:53:55 +0100 |
parents | 31eac42d9123 |
children | 48d606d7192b |
comparison
equal
deleted
inserted
replaced
13661:ee349e228835 | 13662:80d6e1f63ed9 |
---|---|
1892 | 1892 |
1893 for i in xrange(clstart, clend): | 1893 for i in xrange(clstart, clend): |
1894 self.hook("incoming", node=hex(cl.node(i)), | 1894 self.hook("incoming", node=hex(cl.node(i)), |
1895 source=srctype, url=url) | 1895 source=srctype, url=url) |
1896 | 1896 |
1897 # FIXME - why does this care about tip? | |
1898 if newheads == oldheads: | |
1899 bookmarks.update(self, self.dirstate.parents(), self['tip'].node()) | |
1900 | |
1901 # never return 0 here: | 1897 # never return 0 here: |
1902 if newheads < oldheads: | 1898 if newheads < oldheads: |
1903 return newheads - oldheads - 1 | 1899 return newheads - oldheads - 1 |
1904 else: | 1900 else: |
1905 return newheads - oldheads + 1 | 1901 return newheads - oldheads + 1 |