Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
20877:9e9e3a4e9261 | 20878:09e7118715eb |
---|---|
407 """heads of the set of changeset target by the pull""" | 407 """heads of the set of changeset target by the pull""" |
408 # compute target subset | 408 # compute target subset |
409 if self.heads is None: | 409 if self.heads is None: |
410 # We pulled every thing possible | 410 # We pulled every thing possible |
411 # sync on everything common | 411 # sync on everything common |
412 return self.common + self.rheads | 412 c = set(self.common) |
413 ret = list(self.common) | |
414 for n in self.rheads: | |
415 if n not in c: | |
416 ret.append(n) | |
417 return ret | |
413 else: | 418 else: |
414 # We pulled a specific subset | 419 # We pulled a specific subset |
415 # sync on this subset | 420 # sync on this subset |
416 return self.heads | 421 return self.heads |
417 | 422 |