comparison mercurial/localrepo.py @ 18498:4d9f7dd2ac82 stable

pull: fix crash when pulling changeset that get hidden locally (issue3788) When you have obsolescence marker that apply to a pulled changesets, the added changeset is immediately filtered. Then the list of added changeset needs to be build against and unfiltered repo.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Tue, 29 Jan 2013 15:26:10 +0100
parents f009804e2a43
children 751135cca13c
comparison
equal deleted inserted replaced
18497:a58d8936647a 18498:4d9f7dd2ac82
1686 raise util.Abort(_("partial pull cannot be done because " 1686 raise util.Abort(_("partial pull cannot be done because "
1687 "other repository doesn't support " 1687 "other repository doesn't support "
1688 "changegroupsubset.")) 1688 "changegroupsubset."))
1689 else: 1689 else:
1690 cg = remote.changegroupsubset(fetch, heads, 'pull') 1690 cg = remote.changegroupsubset(fetch, heads, 'pull')
1691 clstart = len(self.changelog) 1691 # we use unfiltered changelog here because hidden revision must
1692 # be taken in account for phase synchronization. They may
1693 # becomes public and becomes visible again.
1694 cl = self.unfiltered().changelog
1695 clstart = len(cl)
1692 result = self.addchangegroup(cg, 'pull', remote.url()) 1696 result = self.addchangegroup(cg, 'pull', remote.url())
1693 clend = len(self.changelog) 1697 clend = len(cl)
1694 added = [self.changelog.node(r) for r in xrange(clstart, clend)] 1698 added = [cl.node(r) for r in xrange(clstart, clend)]
1695 1699
1696 # compute target subset 1700 # compute target subset
1697 if heads is None: 1701 if heads is None:
1698 # We pulled every thing possible 1702 # We pulled every thing possible
1699 # sync on everything common 1703 # sync on everything common