Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 43758:71dbd6f6fcb8
import: add a --secret option
Similarly to "hg commit", we add a --secret option to "hg import" for
committing with the secret phase. The option has no short form since
there already is a "-s" for "--similarity".
.. feature::
``hg import`` has a new --secret option for committing with the
secret phase.
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Thu, 21 Nov 2019 09:25:50 +0100 |
parents | f965b1027fb0 |
children | 7b14d649af1b |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Fri Nov 15 15:58:56 2019 -0500 +++ b/mercurial/cmdutil.py Thu Nov 21 09:25:50 2019 +0100 @@ -1771,6 +1771,8 @@ overrides = {} if partial: overrides[(b'ui', b'allowemptycommit')] = True + if opts.get(b'secret'): + overrides[(b'phases', b'new-commit')] = b'secret' with repo.ui.configoverride(overrides, b'import'): n = repo.commit( message, user, date, match=m, editor=editor, extra=extra