[PATCH] scmutil: fix systemrcpath regression introduced in f5dd179bfa4a

Matt Mackall mpm at selenic.com
Sun Apr 15 23:45:03 UTC 2012


On Fri, 2012-04-13 at 10:34 +0200, Wolfgang Treutterer wrote:
> Changeset f5dd179bfa4a (plan9: initial support for plan 9 from bell 
> labs) broke mercurials configuration file lookup. hgrc files located 
> relative to the installation root are no longer read.
> 
> If mercurial is installed e.g. in /usr/local/bin the regression can be 
> verified in the output of the command "hg showconfig --debug":
> 
> read config from: /etc/mercurial/hgrc
> read config from: /etc/mercurial/hgrc
> read config from: /$HOME/.hgrc
> ...
> 
> The system-wide "/etc/mercurial/hgrc" shows up twice in the initial 
> whereas the installation-dependent location 
> "/usr/local/etc/mercurial/hgrc" is missing.
> 
> The reason is that hangeset f5dd179bfa4a introduced a 'root' path 
> component to look for hgrc files, which is used both as an absolute path 
> and a path relative to the <install-root>.
> The latter one was broken since 'root' was set to an absolute location
> and the subsequent os.path.join discarded the <install-root> path prefix.
> 
> This patch changes 'root' to a relative path, such that os.path.join 
> works as expected. The "/" prefix for the system-wide location is added 
> separately.
> 
> # HG changeset patch
> # User wot
> # Date 1334304488 -7200
> # Node ID 4e18cfcb2533e2ad0b672a1a40e41cca6b3e8c98
> # Parent  ee163a9cf37c5783b7707f3264e3be901255ce25
> scmutil: fix systemrcpath regression introduced in f5dd179bfa4a

Queued for default, thanks. For future reference, your mailer mangled
some whitespace here. Also, you username isn't set to an email address.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial-devel mailing list