chg and the schemes extension
Yuya Nishihara
yuya at tcha.org
Mon Feb 10 16:04:43 UTC 2020
On Mon, 10 Feb 2020 07:35:10 -0800, Marc Simpson wrote:
> I encountered some unexpected behaviour with chg this morning:
> It seems that once the command server is running, schemes added to
> ~/.hgrc are not recognised by chg. For example, given the following
> minimal configuration:
>
> [extensions]
> schemes =
>
> [schemes]
> foo = http://foo.example.com/repos/
>
> hg and chg output expand the foo scheme equivalently (this is the
> first chg run, so the command server is started):
>
> $ hg debugexpandscheme foo://baz
> http://foo.example.com/repos/baz
>
> $ chg debugexpandscheme foo://baz
> http://foo.example.com/repos/baz
>
> Subsequently adding a second scheme to ~/.hgrc demonstrates the issue:
>
> [schemes]
> foo = http://foo.example.com/repos/
> bar = http://bar.example.com/repos/
>
> where 'bar' is expanded as expected by hg, but not chg:
>
> $ hg debugexpandscheme bar://baz
> http://bar.example.com/repos/baz
>
> $ chg debugexpandscheme bar://baz
> bar://baz
>
> Is this known behaviour (and working as designed)? The above was
> tested in 5.3.
Perhaps, 'schemes' section has to be added to confighash since it touches
the globals. I'll test it tomorrow.
diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py
--- a/mercurial/chgserver.py
+++ b/mercurial/chgserver.py
@@ -83,6 +83,7 @@ def _hashlist(items):
b'eol', # uses setconfig('eol', ...)
b'extdiff', # uisetup will register new commands
b'extensions',
+ b'schemes', # extsetup will update global hg.schemes
]
_configsectionitems = [
More information about the Mercurial
mailing list