Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 15891:249d3420ec9c
phases: move phase according what was pushed not only what was added added
This fix the lack phase movement when a locally secret changeset without added
children was pushed to the repository. In such case, this changeset would be
present in the bundle source, but not in the ``added`` variable.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 13 Jan 2012 01:42:47 +0100 |
parents | e234eda20984 |
children | 592b3d1742a1 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Jan 13 01:29:03 2012 +0100 +++ b/mercurial/localrepo.py Fri Jan 13 01:42:47 2012 +0100 @@ -2111,11 +2111,22 @@ added = [cl.node(r) for r in xrange(clstart, clend)] publishing = self.ui.configbool('phases', 'publish', True) - if publishing and srctype == 'push': + if srctype == 'push': # Old server can not push the boundary themself. - # This clause ensure pushed changeset are alway marked as public - phases.advanceboundary(self, phases.public, added) - elif srctype != 'strip': # strip should not touch boundary at all + # New server won't push the boundary if changeset already + # existed locally as secrete + # + # We should not use added here but the list of all change in + # the bundle + if publishing: + phases.advanceboundary(self, phases.public, srccontent) + else: + phases.advanceboundary(self, phases.draft, srccontent) + phases.retractboundary(self, phases.draft, added) + elif srctype != 'strip': + # publishing only alter behavior during push + # + # strip should not touch boundary at all phases.retractboundary(self, phases.draft, added) # make changelog see real files again