mercurial/cmdutil.py
branchstable
changeset 44330 b339faf3f843
parent 44098 19533e4c3450
child 44374 f5c006621f07
child 44401 92b7caf4cb9e
--- a/mercurial/cmdutil.py	Tue Feb 18 13:46:10 2020 -0500
+++ b/mercurial/cmdutil.py	Sun Feb 16 17:05:18 2020 -0500
@@ -1898,7 +1898,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: