monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Feature Request: enhanced .mtn-ignore


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Feature Request: enhanced .mtn-ignore
Date: Fri, 4 Aug 2006 16:34:52 -0700
User-agent: Mutt/1.5.12-2006-07-14

On Fri, Aug 04, 2006 at 02:01:17PM -0400, Jonathan S. Shapiro wrote:
> The difference is that in OpenCM, we can explicitly *include* files.
> Rules are processed top to bottom. Here is a comparative example:
> 
>    .mtn-ignore                     .opencm-rules
>     ====================           =====================
>     *~                             exclude *~
>     *.o                            exclude *.o
>                                    include anexception.o

That's nice -- certainly much nicer than CVS's lame "!" syntax:
  http://ximbiot.com/cvs/manual/cvs-stable-snapshot/cvs_18.html#SEC180

If we're talking about extensions to the ignore file format, it might
be worth glancing over at hg, too:
  http://www.selenic.com/mercurial/wiki/index.cgi/.hgignore
especially section "syntax"; they have a feature to switch between
regexen and globs, which seems useful since people are often confused
by regexen.  This can be handled totally separately, though; I mostly
bring it up to note that the proposed syntax seems compatible with
adding hg-style extensions later.

Perhaps the verbs should be "ignore" and "unignore" instead of
"exclude" and "include"?  It seems like there's a potential for
confusion with "include" in particular -- given the name of the file,
one could easily read it as specifying that some file should be
included _on the list of ignored files_, which is quite backwards...

> We don't use the include feature very often, but when we do it is very
> useful. The include feature lets us do two things:
> 
>   1. It lets us override default rules. For example, OpenCM has the
>      built-in default rule "exclude *.o". If a project needs to save
>      object files they can override this by putting
> 
>        include *.o
> 
>      in their .opencm-rules file. Conceptually, the way OpenCM handles
>      default rules is exactly as if they appeared as the first few lines
>      in every .opencm-rules file.

Right -- we definitely need _something_ like this; right now the only
way to modify the default ignore list is to override the ignore hook
as a whole, and that's crazy-clunky for such a basic operation.

I think we'd happily accept a patch implementing this behavior, either
implemented in Lua as a new default ignore_hook, or even better,
implemented in C++ and removing the ignore_hook altogether.

-- Nathaniel

-- 
"But in Middle-earth, the distinct accusative case disappeared from
the speech of the Noldor (such things happen when you are busy
fighting Orcs, Balrogs, and Dragons)."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]