Comments
Patch
@@ -228,8 +228,8 @@
$ mv .hg/hgrc .hg/hgrc.bak
$ hg config phabricator --debug
read config from: */.hgrc (glob)
- */.hgrc:*: phabricator.url=global (glob)
$TESTTMP/repo/.arcconfig: phabricator.callsign=HG
+ $TESTTMP/repo/.arcconfig: phabricator.url=https://phab.mercurial-scm.org/
But it doesn't override local config
$ cat >> .hg/hgrc << EOF
@@ -178,11 +178,16 @@
except IOError:
pass
+ cfg = util.sortdict()
+
if b"repository.callsign" in arcconfig:
- ui.applyconfig(
- {(b"phabricator", b"callsign"): arcconfig[b"repository.callsign"]},
- source=wdirvfs.join(b".arcconfig"),
- )
+ cfg[(b"phabricator", b"callsign")] = arcconfig[b"repository.callsign"]
+
+ if b"phabricator.uri" in arcconfig:
+ cfg[(b"phabricator", b"url")] = arcconfig[b"phabricator.uri"]
+
+ if cfg:
+ ui.applyconfig(cfg, source=wdirvfs.join(b".arcconfig"))
return orig(ui, wdirvfs, hgvfs, requirements) or result # Load .hg/hgrc
@@ -1,5 +1,6 @@
{
"conduit_uri": "https://phab.mercurial-scm.org/api",
+ "phabricator.uri": "https://phab.mercurial-scm.org/",
"repository.callsign": "HG",
"arc.land.onto.default": "@",
"base": "hg:.^"