Mercurial > hg
diff mercurial/exchange.py @ 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 | 004a1744088d |
children | f295b2ac3579 |
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