comparison mercurial/localrepo.py @ 15659:7fba5a245acc

phases: change publish behavior to only alter behavior when server. Older publish=True was: 1) Content of Publishing server are seen as public by client. 2) Any changegroup *added* to a publish=True server is public. New definition are: 1) Content of Publishing server are seen as public by client. 2) Any changegroup *pushed* to a publish=True server is public. See mercurial/phase.py documentation for exact final behavior
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Thu, 15 Dec 2011 23:08:09 +0100
parents e69a3cdad37e
children ebaefd8c6028
comparison
equal deleted inserted replaced
15657:d976b1ef6760 15659:7fba5a245acc
2043 self.hook('pretxnchangegroup', throw=True, 2043 self.hook('pretxnchangegroup', throw=True,
2044 node=hex(cl.node(clstart)), source=srctype, 2044 node=hex(cl.node(clstart)), source=srctype,
2045 url=url, pending=p) 2045 url=url, pending=p)
2046 2046
2047 added = [cl.node(r) for r in xrange(clstart, clend)] 2047 added = [cl.node(r) for r in xrange(clstart, clend)]
2048 if self.ui.configbool('phases', 'publish', True): 2048 publishing = self.ui.configbool('phases', 'publish', True)
2049 if srctype != 'strip': 2049 if publishing and srctype == 'push':
2050 phases.advanceboundary(self, 0, added) 2050 # Old server can not push the boundary themself.
2051 else: 2051 # This clause ensure pushed changeset are alway marked as public
2052 phases.advanceboundary(self, 0, added)
2053 elif srctype != 'strip': # strip should not touch boundary at all
2052 phases.retractboundary(self, 1, added) 2054 phases.retractboundary(self, 1, added)
2053 2055
2054 # make changelog see real files again 2056 # make changelog see real files again
2055 cl.finalize(trp) 2057 cl.finalize(trp)
2056 2058