[PATCH] hg: provide a way to skip reposetup
Yuya Nishihara
yuya at tcha.org
Thu Feb 18 16:40:28 UTC 2016
On Tue, 16 Feb 2016 15:14:25 +0000, Jun Wu wrote:
> 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.
4. Add global option/config/variable to disable config/repo loading.
chgserver.py will load config and extensions under its control.
> 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'.
Can't we defer this until we get an ideal solution? Is this a blocker?
(I don't follow the discussion on IRC, I'm sorry if it's discussed already.)
More information about the Mercurial-devel
mailing list