Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
15890:e234eda20984 | 15891:249d3420ec9c |
---|---|
2109 node=hex(cl.node(clstart)), source=srctype, | 2109 node=hex(cl.node(clstart)), source=srctype, |
2110 url=url, pending=p) | 2110 url=url, pending=p) |
2111 | 2111 |
2112 added = [cl.node(r) for r in xrange(clstart, clend)] | 2112 added = [cl.node(r) for r in xrange(clstart, clend)] |
2113 publishing = self.ui.configbool('phases', 'publish', True) | 2113 publishing = self.ui.configbool('phases', 'publish', True) |
2114 if publishing and srctype == 'push': | 2114 if srctype == 'push': |
2115 # Old server can not push the boundary themself. | 2115 # Old server can not push the boundary themself. |
2116 # This clause ensure pushed changeset are alway marked as public | 2116 # New server won't push the boundary if changeset already |
2117 phases.advanceboundary(self, phases.public, added) | 2117 # existed locally as secrete |
2118 elif srctype != 'strip': # strip should not touch boundary at all | 2118 # |
2119 # We should not use added here but the list of all change in | |
2120 # the bundle | |
2121 if publishing: | |
2122 phases.advanceboundary(self, phases.public, srccontent) | |
2123 else: | |
2124 phases.advanceboundary(self, phases.draft, srccontent) | |
2125 phases.retractboundary(self, phases.draft, added) | |
2126 elif srctype != 'strip': | |
2127 # publishing only alter behavior during push | |
2128 # | |
2129 # strip should not touch boundary at all | |
2119 phases.retractboundary(self, phases.draft, added) | 2130 phases.retractboundary(self, phases.draft, added) |
2120 | 2131 |
2121 # make changelog see real files again | 2132 # make changelog see real files again |
2122 cl.finalize(trp) | 2133 cl.finalize(trp) |
2123 | 2134 |