[PATCH] Check for .hgrc files in ancestor directories above the repository

Jesse Glick jesse.glick at sun.com
Fri Jan 11 12:42:14 CST 2008


Maxim Dounin wrote:
> Another possible solution is to use only files inside '.hg' subdir
> itself since it's banned in util.path_auditor() and thus cannot be
> added or checked out

Good point.

A related approach, which would also solve the Hg-managed home dir 
problem you brought up, would be to reject an include just if it is 
listed as a managed file in the nearest enclosing repo. This would 
preserve flexibility but ensure for safety that you had to either 
personally edit the include, or at least run some non-hg command which 
created it. If you wanted to put an include inside some hg repo for 
automation purposes, it would need to be listed in .hgignore, and 
created on demand by e.g. a Makefile (which you have to trust anyway if 
you run it under your own user ID). Make sense?



More information about the Mercurial-devel mailing list