# HG changeset patch
# User Matt Harbison <matt_harbi...@yahoo.com>
# Date 1526525067 14400
#      Wed May 16 22:44:27 2018 -0400
# Node ID a2ed1f916bba51cb5d1fec26a97c9668810c6588
# Parent  a4a5c3085ea92402224ea4c61fccff3adbc715ec
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`).

diff --git a/contrib/phabricator.py b/contrib/phabricator.py
--- a/contrib/phabricator.py
+++ b/contrib/phabricator.py
@@ -73,6 +73,30 @@ from mercurial.utils import (
 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 @@ def querydrev(repo, spec):
     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)
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to