Thanks! I appreciate the feedback.<br><br><div class="gmail_quote">On Tue, Feb 5, 2013 at 1:41 PM, Kevin Bullock <span dir="ltr"><<a href="mailto:kbullock+mercurial@ringworld.org" target="_blank">kbullock+mercurial@ringworld.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Feb 5, 2013, at 2:55 PM, Ben Kehoe wrote:<br>
<br>
> # HG changeset patch<br>
> # User Ben Kehoe <<a href="mailto:benk@berkeley.edu">benk@berkeley.edu</a>><br>
> # Date 1359580170 28800<br>
> # Node ID 0b5ff522049db893f4d1afb2030cd721f8e17761<br>
> # Parent  1516d5624a2911fcb90ee051c6dc0679b49aef55<br>
> using .gitignore file should use glob as default syntax<br>
><br>
> .gitignore files use glob syntax instead of regexp.<br>
> When a repo is configured to use a custom ignore file named .gitignore, it<br>
> should be parsed using relglob syntax. This is implemented by adding a<br>
> default syntax parameter to ignorepats(), which when passed as None keeps<br>
> the current behavior. In readpats(), files named exactly '.gitignore' pass<br>
> 'relglob' to ingorepats() as the default syntax.<br>
> Tests are added to verify the behavior.<br>
> This patch will work in concert with a patch to hg-git to automatically use<br>
> the .gitignore file if it exists.<br>
<br>
</div>I think this is unwise. gitignore[1] glob syntax and semantics are different from hgignore[2]. In particular, gitignore globs are relative to the .gitignore file (which also needn't be at the repo root!); globs in hgignore aren't rooted to anything.<br>


<br>
[1]: <a href="http://www.kernel.org/pub/software/scm/git/docs/gitignore.html" target="_blank">http://www.kernel.org/pub/software/scm/git/docs/gitignore.html</a><br>
[2]: <a href="http://www.selenic.com/hg/help/ignore" target="_blank">http://www.selenic.com/hg/help/ignore</a><br>
<br>
This also isn't what the ui.ignore config option is intended for; it's meant to specify per-*user* ignore files. Mercurial doesn't provide a way for you to specify an alternate ignore file for a *repository* -- and using ui.ignore to do this will lead you to pain when you forget to configure it on one of your clones.<br>


<br>
What would be better is a hunk of code to automatically convert a .gitignore file into an .hgignore file. (I've been wanting this for a while, probably for the same reasons you wrote this patch.)<br>
<br>
pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和<br>
Kevin R. Bullock<br>
<br>
</blockquote></div><br>