Ignore/include

Stephen J. Turnbull stephen at xemacs.org
Fri Feb 6 02:46:12 GMT 2009


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. 

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).

 > Since the documentation is always auto-generated i got to thinking 
 > that a file, perhaps called .bzrinclude, which essentially always 
 > adds files defined in, but that are otherwise ignored.

Adding new files is a Bad Idea[tm], especially when an existing file
can do the job more flexibly (the rules in one file can depend on
order, while more than one file means that one kind of rule must come
after the other, yuck).

In fact I think that special purpose files like .bzrignore should go
away in favor of "rules" files (but given the conservatism of the
bazaar developers, that event will have to wait for the Keynesian long
run<wink>).

 > I realise that i am new to this forum and i don't even know if this 
 > is the right place to make such suggestions.

This is a great place to make suggestions that need refinement (even
though yours was fairly precise, even if implemented as is you still
need to specify the precedence of bzrignore vs bzrinclude).  If you
have a suggestion that has proceeded to the level of offering a patch,
you might also want to register at Launchpad and file a bug/RFE there.



More information about the bazaar mailing list