mercurial/cmdutil.py
changeset 44374 f5c006621f07
parent 44367 9dab3fa64325
parent 44330 b339faf3f843
child 44440 d543ef183eb8
--- a/mercurial/cmdutil.py	Thu Feb 13 22:51:17 2020 -0500
+++ b/mercurial/cmdutil.py	Mon Feb 24 13:50:55 2020 -0500
@@ -2011,7 +2011,12 @@
                 branch=branch,
                 editor=editor,
             )
-            n = memctx.commit()
+
+            overrides = {}
+            if opts.get(b'secret'):
+                overrides[(b'phases', b'new-commit')] = b'secret'
+            with repo.ui.configoverride(overrides, b'import'):
+                n = memctx.commit()
         finally:
             store.close()
     if opts.get(b'exact') and nocommit: