Questions about contributing

Mads Kiilerich mads at
Thu Sep 8 03:59:35 CDT 2011

On 09/08/2011 06:22 AM, Ben Hughes wrote:
> The change is to be able to control the name of the .hg directory. We
> were hoping that '.hg' was set as a constant somewhere and that we
> could simply change it and recompile. However it looks like it's just
> an assumed convention and is used all over the place (in 65 .py files,
> if my grep'ing is correct).

AFAICS there is no more than 30 places.

> So my questions:
>   - other than convention and convenience, is there any reason that the
> .hg directory isn't currently stored in a constant somewhere?

As you describe it it would be an unnecessary abstraction and extra 
complexity and more verbose code without any benefit. I doubt a patch 
for that would be accepted. A repo made by a Mercurial hacked as you 
describe it would no longer be a Mercurial repository. One of Mercurials 
core values is that the repository format only change in backward 
compatible ways.

Most access to .hg is for other reasons done through functions that 
abstract the exact location. It is possible that some occurrences of 
'.hg' could benefit from using something similar - that would reduce the 
size of your hack.

>   - if I were to make the change for our internal use (which is very
> likely), is it a change that the community would be interested in?

Note that Mercurial is GPLv2+. If you ever distribute your application 
it would have to be under a compatible license. That should however not 
be a problem if it is for internal use within your own legal entity only.

(There will not be any license constraints if you use standard Mercurial 
and the new command server API. You may be in a grey legal area if you 
at the same time modify Mercurial to fit your custom needs.)


More information about the Mercurial-devel mailing list