mercurial/cmdutil.py
branchstable
changeset 20700 b0153cb8b64e
parent 20072 6d4fda48b4e3
child 20702 2764148aa088
child 20771 434619dae569
--- a/mercurial/cmdutil.py	Wed Mar 12 10:26:48 2014 +0200
+++ b/mercurial/cmdutil.py	Thu Mar 13 19:48:41 2014 +0900
@@ -1797,7 +1797,11 @@
 
             ph = repo.ui.config('phases', 'new-commit', phases.draft)
             try:
-                repo.ui.setconfig('phases', 'new-commit', old.phase())
+                if opts.get('secret'):
+                    commitphase = 'secret'
+                else:
+                    commitphase = old.phase()
+                repo.ui.setconfig('phases', 'new-commit', commitphase)
                 newid = repo.commitctx(new)
             finally:
                 repo.ui.setconfig('phases', 'new-commit', ph)