diff hgext/phabricator.py @ 44551:9bae1d1a0f4c

phabricator: add a config knob to import in the secret phase For my use anyway, it's better to have a config knob that's always set than to try to remember a switch. But we can add a tristate switch if desired. Differential Revision: https://phab.mercurial-scm.org/D8137
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 16 Feb 2020 17:17:41 -0500
parents bbb170f9396d
children f10055b099b3
line wrap: on
line diff
--- a/hgext/phabricator.py	Sun Feb 16 16:13:36 2020 -0500
+++ b/hgext/phabricator.py	Sun Feb 16 17:17:41 2020 -0500
@@ -124,6 +124,9 @@
 eh.configitem(
     b'phabsend', b'confirm', default=False,
 )
+eh.configitem(
+    b'phabimport', b'secret', default=False,
+)
 
 colortable = {
     b'phabricator.action.created': b'green',
@@ -1729,6 +1732,9 @@
     # Evolve 9.3.0 assumes this key is present in cmdutil.tryimportone()
     opts[b'obsolete'] = False
 
+    if ui.configbool(b'phabimport', b'secret'):
+        opts[b'secret'] = True
+
     def _write(patches):
         parents = repo[None].parents()