Mercurial > public > mercurial-scm > hg
diff tests/test-import.t @ 43725: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 | 27c4f93d07a9 |
children | b339faf3f843 |
line wrap: on
line diff
--- a/tests/test-import.t Fri Nov 15 15:58:56 2019 -0500 +++ b/tests/test-import.t Thu Nov 21 09:25:50 2019 +0100 @@ -435,6 +435,49 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: second change + $ hg --cwd b phase tip + 1: draft + $ rm -r b + + +hg import --secret + + $ hg clone -r0 a b -q + $ hg --cwd b import --no-commit --secret ../exported-tip.patch + abort: cannot use --no-commit with --secret + [255] + $ hg --cwd b import --secret ../exported-tip.patch + applying ../exported-tip.patch + $ hg --cwd b diff -c . --nodates + diff -r 80971e65b431 -r 1d4bd90af0e4 a + --- a/a + +++ b/a + @@ -1,1 +1,2 @@ + line 1 + +line 2 + $ hg --cwd b phase + 1: secret + $ hg --cwd b --config extensions.strip= strip 1 --no-backup --quiet + $ HGEDITOR=cat hg --cwd b import --secret --edit ../exported-tip.patch + applying ../exported-tip.patch + second change + + + HG: Enter commit message. Lines beginning with 'HG:' are removed. + HG: Leave message empty to abort commit. + HG: -- + HG: user: someone + HG: branch 'default' + HG: changed a + $ hg --cwd b diff -c . --nodates + diff -r 80971e65b431 -r 1d4bd90af0e4 a + --- a/a + +++ b/a + @@ -1,1 +1,2 @@ + line 1 + +line 2 + $ hg --cwd b phase + 1: secret $ rm -r b