Questions about contributing

Ben Hughes ben at benrhughes.com
Thu Sep 8 02:41:36 CDT 2011


Thanks for the feedback :-)

> There are no real advantages in renaming the .hg directory.

There certainly is for us, but I agree, there's probably not much
benefit for the community.

However, storing the dir name in a variable means that everyone
writing extensions etc doesn't have to hard-code '.hg' everywhere. Not
a big deal, but it seems cleaner to me. I'm only passingly familiar
with python though, so I could have the wrong end of the pythonic
stick.

> If ".hg" becomes variable it can mutate to ".foobar", or worse, "../foo/.hg"
> and point to completely unrelated repositories. This alone would certainly
> become a maintenance horror since you can't rely on the fact to find the
> repository data in ".hg".

Well, yes, if you do something silly obviously it will cause problems
:-). As for relying on the fact that repository data is in .hg - you
don't need to, you can just reference the variable (that's kinda the
point).

> Further: Think of Alice and Bob that work together on a shared repository
> "foo". Now comes Mallory and changes "foo/.hg" to "foo/.bar". Alice and Bob
> surely won't be happy about this.

Surely this is only in issue if Mallory builds her own version of Hg
from source and purposefully changes the dir name variable? In which
case, she wouldn't be able to interact with the repository recreated
by Alice and Bob anyway. Although I agree it could cause confusion.

> I don't think mercurial should support this. From my side: -1

No problems - thanks for your feedback :-)

Cheers,

Ben


More information about the Mercurial-devel mailing list