Ignore/include

Wouter van Heyst larstiq at larstiq.dyndns.org
Sun Feb 8 23:10:38 GMT 2009


On Fri, Feb 06, 2009 at 11:46:12AM +0900, Stephen J. Turnbull wrote:
> potsed writes:
> 
>  > For example i routinely ignore files named _* in my .bzrignore 
>  > file, however the documentation application i use to document 
>  > my projects automatically creates files with an _, which when 
>  > i package my app means that the documentation is not complete. 

It seems to me ignoring '_*' is an overly wide filter then. Is it
perhaps not easy to predict what the documentation app will spit out?

> I don't understand the problem.  There may be a better way of
> accomplishing what you want (FSVO better, YMMV of course). The usual
> approach here is that if your distribution package is a source
> package, then you simply add a requirement that the documentation
> application be available to build your application.  If your
> distribution package is a binary package, then you add a rule that the
> package is not complete until the documentation has been added to it
> to your package building tool.
> 
> I thought that bzr's patterns supported negated patterns, but that
> seems not to be the case (see "bzr help patterns").  Apparently only
> git has that (although "hg add" supports an -I flag that DTRTs).

It's even in the ignore help, but you need a regex pattern:

    Ignore everything but the "debian" toplevel directory:

        bzr ignore "RE:(?!debian/).*"

Wouter van Heyst



More information about the bazaar mailing list