RFC: handling of ignore files

Robert Collins robertc at robertcollins.net
Sun Mar 27 11:38:47 BST 2005

On Sun, 2005-03-27 at 19:07 +1000, Martin Pool wrote:
> 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.

I think that a global pattern + per dir overrides should be sufficient.
One problem with subdir overrides is that in subtrees you may need to
revoke the override. So I'm really not sure that either subtree
recursive rules, or subdir dir-only rules work well. This could be
addressed by unignore rules - but that is no longer so simple.

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

From experience ... any defaults will be sufficiently wrong for someone.
A knob is needed.

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

One problem with tlas approach is that then the defaults are frozen at
the time of creation of the file.

If I may suggest, perhaps a config entry somewhere rather than writing
the defaults out... and by default the builtin defaults still apply.

GNU Arch needed its defaults written to the tree because its inventory
logic resulted in bad changesets when the defaults in the program were
changed. AIUI the bzr rules are 'if its added, it doesn't matter if its
ignored or not', so it won't suffer from this rather bad behaviour.


GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050327/7211aa50/attachment.pgp 

More information about the bazaar mailing list