[PATCH] hg: provide a way to skip reposetup

Jun Wu quark at fb.com
Tue Feb 16 10:14:25 EST 2016


On 02/16/2016 02:52 PM, Pierre-Yves David wrote:
> Could we do something cleaner than a global variable here?

Here are some alternatives I have considered before:

1. Split reposetup from hg.repository() and add the flag elsewhere,
which is a non-trivial, may be a breaking change.

2. Use a separate command marked as "norepo" for chgserver ("norepo"
will still load repo config), but then we need some hack to silence
"warning: --repository ignored".

3. Make chgserver a standalone hg binary that does not start from hg.py.
This may only make sense if we have done enough refactoring to make it
easy to implement dispatch.py-like logic.

I think it's okay to add it here for now since this change looks safer
then alternatives and the alternatives are not 100% ideal either, plus
we already have 'wirepeersetupfuncs'.

Ideally we may do enough refactoring and then can come back to see if we
have better place for this one and 'wirepeersetupfuncs'.


More information about the Mercurial-devel mailing list