diff --git a/.arcconfig b/.arcconfig index 59b3fe1e2021c2a6868c8939bea6ce6649c4baa1_LmFyY2NvbmZpZw==..ff396501e8410ba455baabc4090fb1209c5af22b_LmFyY2NvbmZpZw== 100644 --- a/.arcconfig +++ b/.arcconfig @@ -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:.^" diff --git a/hgext/phabricator.py b/hgext/phabricator.py index 59b3fe1e2021c2a6868c8939bea6ce6649c4baa1_aGdleHQvcGhhYnJpY2F0b3IucHk=..ff396501e8410ba455baabc4090fb1209c5af22b_aGdleHQvcGhhYnJpY2F0b3IucHk= 100644 --- a/hgext/phabricator.py +++ b/hgext/phabricator.py @@ -178,4 +178,6 @@ except IOError: pass + cfg = util.sortdict() + if b"repository.callsign" in arcconfig: @@ -181,8 +183,11 @@ 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 diff --git a/tests/test-phabricator.t b/tests/test-phabricator.t index 59b3fe1e2021c2a6868c8939bea6ce6649c4baa1_dGVzdHMvdGVzdC1waGFicmljYXRvci50..ff396501e8410ba455baabc4090fb1209c5af22b_dGVzdHMvdGVzdC1waGFicmljYXRvci50 100644 --- a/tests/test-phabricator.t +++ b/tests/test-phabricator.t @@ -228,5 +228,4 @@ $ 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 @@ -232,4 +231,5 @@ $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