diff hgext/mq.py @ 16017:2605fc990725 stable

mq: add secret setting
author Matt Mackall <mpm@selenic.com>
date Sun, 29 Jan 2012 12:59:21 -0600
parents 341c58282b25
children 31c02546e6de
line wrap: on
line diff
--- a/hgext/mq.py	Sun Jan 29 12:59:11 2012 -0600
+++ b/hgext/mq.py	Sun Jan 29 12:59:21 2012 -0600
@@ -38,6 +38,12 @@
 'no', mq will override the [diff] section and always generate git or
 regular patches, possibly losing data in the second case.
 
+It may be desirable for mq changesets in the secret phase (see
+:hg:`help phases`), which can be enabled with the following setting::
+
+  [mq]
+  secret = True
+
 You will by default be managing a patch queue named "patches". You can
 create other, independent patch queues with the :hg:`qqueue` command.
 '''
@@ -256,6 +262,9 @@
 
     It should be used instead of repo.commit inside the mq source
     """
+    if not repo.ui.configbool('mq', 'secret', False):
+        return repo.commit(*args, **kwargs)
+
     backup = repo.ui.backupconfig('phases', 'new-commit')
     try:
         # ensure we create a secret changeset