[patch] syntax:plain for .hgignore

Jonathan S. Shapiro shap at eros-os.com
Sun Sep 9 15:08:59 CDT 2007


On Sun, 2007-09-09 at 15:58 -0300, Alexis S. L. Carvalho wrote:
> There's one significant difference:
> 
> - path:path/to/dir matches any file under path/to/dir/
> 
> - plain:path/to/dir only matches a file called path/to/dir

Here is a completely different opinion: the right fix is to drop
syntax:plain entirely.

The .hgignore file seems to be a place where far too many options are
getting injected. This will rapidly become unmaintainable, and the whole
thing will collapse of its own weight. Frankly, the "regexp or glob"
distinction is already too much for most users.

Here is the question that we should be asking: is the benefit of plain
syntax buying us enough advantage to justify the confusion that it
creates?

  path:path/to/dir

can be expressed already by:

  syntax: glob
  /path/to/dir/**

while plain:path/to/file

can be expressed already by:

  syntax: glob
  /path/to/file

So what benefit are we getting from path/plain? The only benefit I can
see here is if bos gets paid for his book by the word :-)


(in both cases I intend an anchored glob -- I'm not sure that I got the
syntax correct).

-- 
Jonathan S. Shapiro
Managing Director
The EROS Group, LLC
www.coyotos.org, www.eros-os.org



More information about the Mercurial-devel mailing list