Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 42163:e45c6b153e51 stable
commit: allow --interactive to work again when naming a directory (issue6131)
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 06 May 2019 22:10:34 -0400 |
parents | db72f9f6580e |
children | 19b95afb0c01 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Fri May 03 20:06:03 2019 +0900 +++ b/mercurial/cmdutil.py Mon May 06 22:10:34 2019 -0400 @@ -272,6 +272,15 @@ raise error.Abort(_('cannot partially commit a merge ' '(use "hg commit" instead)')) + def fail(f, msg): + raise error.Abort('%s: %s' % (f, msg)) + + force = opts.get('force') + if not force: + vdirs = [] + match.explicitdir = vdirs.append + match.bad = fail + status = repo.status(match=match) overrides = {(b'ui', b'commitsubrepos'): True} @@ -294,15 +303,6 @@ dirtyreason = wctx.sub(s).dirtyreason(True) raise error.Abort(dirtyreason) - def fail(f, msg): - raise error.Abort('%s: %s' % (f, msg)) - - force = opts.get('force') - if not force: - vdirs = [] - match.explicitdir = vdirs.append - match.bad = fail - if not force: repo.checkcommitpatterns(wctx, vdirs, match, status, fail) diffopts = patch.difffeatureopts(ui, opts=opts, whitespace=True,