[PATCH v3] hg: allow usage of XDG_CONFIG_HOME and $HOME/.config/hg/hgrc

Yuya Nishihara yuya at tcha.org
Tue Feb 14 08:34:19 EST 2017


On Mon, 13 Feb 2017 09:37:48 -0800, Jun Wu wrote:
> Excerpts from David Demelier's message of 2017-02-13 15:43:45 +0100:
> > Le 10/02/2017 à 10:08, Raffaele Salmaso a écrit :
> > > Hi,
> > >
> > > On Fri, Feb 10, 2017 at 9:19 AM, David Demelier
> > > <demelier.david at gmail.com <mailto:demelier.david at gmail.com>> wrote:
> > >
> > >     I've updated the code so that hg config --edit still create a
> > >     ~/.hgrc file first if no file is found.
> > >
> > > Why?
> > > If you support this specs, I expect it does the right thing by default
> > > (or at least ask, if any)
> > >
> > > A lot of things can go wrong even for $HOME/.hgrc, so I don't think it
> > > is a bigger problem creating a directory first
> > >
> > 
> > I have no problem with this but I would like to know if everybody agree 
> > with that.
> > 
> 
> I'm +1 on creating the directory and editing XDG_CONFIG_HOME/hg/hgrc if
> ~/.hgrc does not exist.

-1 for compatibility with old versions. Since old hg won't read .config/hg/hgrc,
creating it by default could confuse users.


More information about the Mercurial-devel mailing list