Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
43757:d155bf11cf22 | 43758:71dbd6f6fcb8 |
---|---|
1769 for idfunc in extrapreimport: | 1769 for idfunc in extrapreimport: |
1770 extrapreimportmap[idfunc](repo, patchdata, extra, opts) | 1770 extrapreimportmap[idfunc](repo, patchdata, extra, opts) |
1771 overrides = {} | 1771 overrides = {} |
1772 if partial: | 1772 if partial: |
1773 overrides[(b'ui', b'allowemptycommit')] = True | 1773 overrides[(b'ui', b'allowemptycommit')] = True |
1774 if opts.get(b'secret'): | |
1775 overrides[(b'phases', b'new-commit')] = b'secret' | |
1774 with repo.ui.configoverride(overrides, b'import'): | 1776 with repo.ui.configoverride(overrides, b'import'): |
1775 n = repo.commit( | 1777 n = repo.commit( |
1776 message, user, date, match=m, editor=editor, extra=extra | 1778 message, user, date, match=m, editor=editor, extra=extra |
1777 ) | 1779 ) |
1778 for idfunc in extrapostimport: | 1780 for idfunc in extrapostimport: |