Mercurial > public > mercurial-scm > hg-stable
diff mercurial/merge.py @ 24471:1ff35d76421c
subrepo: add bailifchanged to centralize raising Abort if subrepo is dirty
This patch also centralizes composing dirty reason message like
"uncommitted changes in subrepository 'xxxx'".
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 25 Mar 2015 13:55:35 +0900 |
parents | 6becb9dbca25 |
children | a8e6897dffbe |
line wrap: on
line diff
--- a/mercurial/merge.py Wed Mar 25 13:55:32 2015 +0900 +++ b/mercurial/merge.py Wed Mar 25 13:55:35 2015 +0900 @@ -1045,9 +1045,7 @@ raise util.Abort(_("uncommitted changes"), hint=_("use 'hg status' to list changes")) for s in sorted(wc.substate): - if wc.sub(s).dirty(): - raise util.Abort(_("uncommitted changes in " - "subrepository '%s'") % s) + wc.sub(s).bailifchanged() elif not overwrite: if p1 == p2: # no-op update