RFC: handling of ignore files

William Dode wilk-ml at flibuste.net
Sun Mar 27 09:55:24 BST 2005

Martin Pool <mbp at sourcefrog.net> writes:

> Like CVS, bazaar-ng allows you to specify a list of files which are
> ignored: temporary files, backups, built programs, and so on.  The only
> effect is that they can be present in a working tree and not reported as
> unversioned.
> There is a builtin default ignore list: .bzr.log, *~, #*#, *.tmp, *.bak,
> *.o, *.a, *.py[oc], {arch}, CVS, .svn, _darcs.
> You can add your own patterns by creating a .bzrignore file at the top
> of the tree.  In the future I may add an option to make a file in a
> subdirectory that matches only from that point downwards.
> At the moment if you create a .bzrignore file the defaults are not used.
>    This is a bit undesirable.
> Q: Should the defaults always be active, or do you think people ever
> want a way to turn them off?  I think they're pretty conservative, so it
> might be OK to always leave them on.
> If there needs to be a way to turn them off, then how should that be
> done?  One way is to have 'bzr init' create a default .bzrignore file,
> which means it is simple to see how to remove patterns.  This is also
> consistent with tla, fwiw.  But it is perhaps a bit distasteful to
> create files within the working directory.

It could be fine to can use a $HOME/.bzrignore, but of course we cannot
use it for all project, so we can copy a default .bzrignore in the
project or copy $HOME/.bzrignore if it exists.

I would not like to have a default .bzrignore that i don't see... that
could change if i upgrade bzr...

For the format of bzrignore, what about the well known format of
--exlude-from from rsync ? I prefer one file on the top than one
on each directories.

For example, i use cheetah template and i don't want to include the
generated .py, i just need __init__.py, so i would like to have this
.bzrignore :

+ template/__init__.py

I could use this for all my project...

William - http://flibuste.net

More information about the bazaar mailing list