Page MenuHomePhabricator

phabricator: load .arcconfig during reposetup (issue6331)
Needs RevisionPublic

Authored by sfink on May 14 2020, 8:15 PM.

Details

Summary

Wrapping localrepo's loadhgrc() was not working for me because it is too late to wrap loadhgrc when the extension is loaded.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

sfink created this revision.May 14 2020, 8:15 PM
sfink edited reviewers, added: mharbison72; removed: hg-reviewers.May 14 2020, 8:16 PM

I'll try to take a closer look at this some time this weekend. In the meantime, can you explain more why it didn't work for you? There are tests that cover this feature, so I'm wondering if some coverage is missing.

I'm not sure if this is intentional, but it appears that it will unconditionally override even .hg/hgrc configs if .arcconfig is present. Before it would only override the global config, load .arcconfig, and then load .hg/hgrc. I guess it's only a small benefit that you could re-target the phab instance without dirtying the repo, so I'm not strongly against the change.

One of the lines looks like it might be long-ish, so you might want to run ./run-tests --local test-phabricator.t test-check-* to make sure it's OK.

hgext/phabricator.py
175

if not repo.local() is the typical way to do this check.

marmoute requested changes to this revision.Mon, Jun 8, 1:40 PM
marmoute added a subscriber: marmoute.

There seems to be extra explanation and style change required (as per @mharbisson72 comment).

This revision now requires changes to proceed.Mon, Jun 8, 1:40 PM