changeset 38075:5a7cf42ba6ef

phabricator: register config settings I didn't bother registering the deprecated phabricator.auth.*, and I'm not sure if the two flagged as 'developer config' should be moved to [devel] (or why there's a distinction between `repophid` and `callsign`).
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 16 May 2018 22:44:27 -0400
parents 242eb5132203
children 5989261a8356
files contrib/phabricator.py
diffstat 1 files changed, 25 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/phabricator.py	Wed May 16 14:11:41 2018 -0600
+++ b/contrib/phabricator.py	Wed May 16 22:44:27 2018 -0400
@@ -73,6 +73,30 @@
 cmdtable = {}
 command = registrar.command(cmdtable)
 
+configtable = {}
+configitem = registrar.configitem(configtable)
+
+# developer config: phabricator.batchsize
+configitem('phabricator', 'batchsize',
+    default=12,
+)
+configitem('phabricator', 'callsign',
+    default=None,
+)
+configitem('phabricator', 'curlcmd',
+    default=None,
+)
+# developer config: phabricator.repophid
+configitem('phabricator', 'repophid',
+    default=None,
+)
+configitem('phabricator', 'url',
+    default=None,
+)
+configitem('phabsend', 'confirm',
+    default=False,
+)
+
 colortable = {
     'phabricator.action.created': 'green',
     'phabricator.action.skipped': 'magenta',
@@ -750,7 +774,7 @@
     drevs, ancestordrevs = _prefetchdrevs(tree)
 
     # developer config: phabricator.batchsize
-    batchsize = repo.ui.configint('phabricator', 'batchsize', 12)
+    batchsize = repo.ui.configint('phabricator', 'batchsize')
 
     # Prefetch Differential Revisions in batch
     tofetch = set(drevs)