changeset 20878:09e7118715eb

pull: prevent duplicated entry in `op.pulledsubset` In the bare pull case we could add the same node multiple time to the `pulloperation.pulledsubset`. Beside being a bit wrong this confused the new revset implementation of `revset._revancestor` into giving bad result. This changeset fix the pull operation part. The fix for the revset itself will come in another changeset.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 26 Mar 2014 15:55:32 -0700
parents 9e9e3a4e9261
children cd03854a2e06
files mercurial/exchange.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Thu Mar 20 01:24:45 2014 -0700
+++ b/mercurial/exchange.py	Wed Mar 26 15:55:32 2014 -0700
@@ -409,7 +409,12 @@
         if self.heads is None:
             # We pulled every thing possible
             # sync on everything common
-            return self.common + self.rheads
+            c = set(self.common)
+            ret = list(self.common)
+            for n in self.rheads:
+                if n not in c:
+                    ret.append(n)
+            return ret
         else:
             # We pulled a specific subset
             # sync on this subset