[PATCH 0 or 1] Fix handling non-root pattern matching in .hgignore files

Mitch Frazier mitch at fmr.name
Thu Nov 3 02:48:52 UTC 2005


Matt Mackall wrote:
> On Wed, Nov 02, 2005 at 08:05:18PM -0600, Mitch Frazier wrote:
>> The .hgignore file supports the following syntax:
>>
>>     syntax: regexp # defaults following lines to non-rooted regexps
>>     syntax: glob   # defaults following lines to non-rooted globs
>>     re:pattern     # non-rooted regular expression
>>     glob:pattern   # non-rooted glob
>>     pattern        # pattern of the current default type
>>
>> The "re:pattern" and "glob:pattern" syntaxes don't work.  This patch
>> fixes the problem.
> 
> What wasn't working? Can I get you to make a test case?
> 

After looking at the existing test case I'm confused.  The test case
(tests/test-hgignore) has this stuff commented out:

  # XXX: broken
  #echo "glob:**.o" > .hgignore
  #echo "--" ; hg status
  #
  #echo "glob:*.o" > .hgignore
  #echo "--" ; hg status

Which agrees with what I found, that it doesn't work.

But it also has:

  echo "relglob:*" > .hgignore
  echo "--" ; hg status

Which works until you apply the patch, then the first case will work and
the second one will break.  My confusion is as to whether or not the
second syntax is supported.  According to the comment in dirstate.py, it
is not supported.



More information about the Mercurial mailing list