[PATCH] Improved per-user .hgignore patch -- documentation updates and minor implementation difference

Bryan O'Sullivan bos at serpentine.com
Fri Mar 24 17:32:17 UTC 2006


On Fri, 2006-03-24 at 11:56 -0500, Colin McMillen wrote:

> ~/.hgignore is always read if it exists,

I don't know that I like this bit.

The rest of the patch looks mostly fine, though I would like you to have
one more go at it, please, based on the comments below.

> +                 os.path.expanduser('~/.hgignore')]

This contains a Unix path separator.  You need to call expanduser on ~
alone, then use os.path.join to add .hgignore.  Or else just drop this
behaviour, which I'd prefer :-)

> +                            self.ui.warn(_(".hgignore: ignoring invalid "
> +                                           "syntax '%s'\n") % s)

This should print the name of the file that contains the problem.

Also, now that there can be multiple ignore files, it's important to
print the name of an ignore file file that contains an invalid pattern,
or else users will rapidly become lost.

Thanks,

	<b




More information about the Mercurial mailing list