changeset 20220:2888a412f0b0

pull: fix post-pull common computation Before that changes, pulled revision that happend to be already known locally (so, not actually added) was not taken into account when computing the new common set between local and remote. It appears that we already know the heads of the pulled set. It is in the `rheads` variable, so we are just using it and everything is works fine. We are dropping the, now useless, computation of `added` set in the process.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sat, 16 Nov 2013 15:36:50 -0500
parents f694cd81b600
children 7401bb54fe76
files mercurial/localrepo.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Nov 25 22:00:46 2013 +0100
+++ b/mercurial/localrepo.py	Sat Nov 16 15:36:50 2013 -0500
@@ -1670,7 +1670,6 @@
             common, fetch, rheads = tmp
             if not fetch:
                 self.ui.status(_("no changes found\n"))
-                added = []
                 result = 0
             else:
                 tr = self.transaction(trname)
@@ -1696,16 +1695,13 @@
                 # be taken in account for phase synchronization. They may
                 # becomes public and becomes visible again.
                 cl = self.unfiltered().changelog
-                clstart = len(cl)
                 result = self.addchangegroup(cg, 'pull', remote.url())
-                clend = len(cl)
-                added = [cl.node(r) for r in xrange(clstart, clend)]
 
             # compute target subset
             if heads is None:
                 # We pulled every thing possible
                 # sync on everything common
-                subset = common + added
+                subset = common + rheads
             else:
                 # We pulled a specific subset
                 # sync on this subset