# HG changeset patch # User Matt Harbison # Date 2018-05-17 02:44:27 # Node ID 5a7cf42ba6efc0779d1ff4d4f13e8571b9c68431 # Parent 242eb51322030512fbf6bf218e8b202c6bf2a1ce 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)