Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Dec 15 15:27:11 2011 -0600 +++ b/mercurial/localrepo.py Thu Dec 15 23:08:09 2011 +0100 @@ -2045,10 +2045,12 @@ url=url, pending=p) added = [cl.node(r) for r in xrange(clstart, clend)] - if self.ui.configbool('phases', 'publish', True): - if srctype != 'strip': - phases.advanceboundary(self, 0, added) - else: + publishing = self.ui.configbool('phases', 'publish', True) + if publishing and srctype == 'push': + # Old server can not push the boundary themself. + # This clause ensure pushed changeset are alway marked as public + phases.advanceboundary(self, 0, added) + elif srctype != 'strip': # strip should not touch boundary at all phases.retractboundary(self, 1, added) # make changelog see real files again