git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: [PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 12, 2014, 20:01 UTC
Message-ID
<53499bb02c140_285f9032ec58@nysa.notmuch>
In-Reply-To
<53076DFC.1000602@gmail.com>
Daniel Liew wrote:
Show 6 quoted lines
> git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc
> 
> Use the hgrc configuration file in the internal mercurial repository in
> addition to the other system wide hgrc files. This is done by using the
> 'ui' object from the 'repository' object which will have loaded the
> repository hgrc file if it exists.

What is the problem you are trying to solve? Is there a way to test that this code is working correctly?

> Prior to this patch the mercurial repository's hgrc file was ignored
> which I consider to be a bug.

It might be, although the internal repository is not supposed to be used by the user.

Show 16 quoted lines
> Signed-off-by: Dan Liew <delcypher@gmail.com>
> ---
>  contrib/remote-helpers/git-remote-hg | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/contrib/remote-helpers/git-remote-hg
> b/contrib/remote-helpers/git-remote-hg
> index eb89ef6..451842a 100755
> --- a/contrib/remote-helpers/git-remote-hg
> +++ b/contrib/remote-helpers/git-remote-hg
> @@ -421,7 +421,7 @@ def get_repo(url, alias):
> 
>          repo = hg.repository(myui, local_path)
>          try:
> -            peer = hg.peer(myui, {}, url)
> +            peer = hg.peer(repo._unfilteredrepo.ui, {}, url)
Why not repo.unfiltered.ui? Or just repo.ui.
Cheers.
-- 
Felipe Contreras
Previous: DelcypherNext: Delcypher
Message 3 of 10 in “git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc”
  1. git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrcDaniel Liew, Feb 21, 2014
  2. DelcypherMar 24, 2014
  3. Felipe ContrerasApr 12, 2014
  4. DelcypherApr 15, 2014
  5. Felipe ContrerasApr 20, 2014
  6. DelcypherApr 20, 2014
  7. Felipe ContrerasApr 20, 2014
  8. DelcypherApr 20, 2014
  9. Felipe ContrerasApr 20, 2014
  10. DelcypherApr 20, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.