Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 20176:4c96c50ef937
subrepo: check phase of state in each subrepositories before committing
Before this patch, phase of newly created commit is determined by
"phases.new-commit" configuration regardless of phase of state in each
subrepositories.
For example, this may cause the "public" revision in the parent
repository referring the "secret" one in subrepository.
This patch checks phase of state in each subrepositories before
committing in the parent, and aborts or changes phase of newly created
commit if subrepositories have more restricted phase than the parent.
This patch uses "follow" as default value of "phases.checksubrepos"
configuration, because it can keep consistency between phases of the
parent and subrepositories without breaking existing tool chains.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 13 Nov 2013 15:55:30 +0900 |
parents | abfe6a8e619b |
children | 969148b49fc6 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Dec 16 12:59:32 2013 -0600 +++ b/mercurial/localrepo.py Wed Nov 13 15:55:30 2013 +0900 @@ -1382,7 +1382,7 @@ parent2=xp2, pending=p) self.changelog.finalize(trp) # set the new commit is proper phase - targetphase = phases.newcommitphase(self.ui) + targetphase = subrepo.newcommitphase(self.ui, ctx) if targetphase: # retract boundary do not alter parent changeset. # if a parent have higher the resulting phase will