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`).
--- 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)