discussing ignore rules

John A Meinel john at arbash-meinel.com
Thu May 11 01:37:57 BST 2006


Wayne Davison wrote:
> I would like to see a way to specify ignore rules that apply to all bzr
> projects because I have some file names that I use in my personal habits
> that need to be ignored by bzr (e.g. I output diff info to a file named
> "x.patch"), but these rules shouldn't get added a project's .bzrignore
> file (because other folks don't need to ignore my personal filenames).
> 
> Earlier this year some folks discussed moving all the DEFAULT_IGNORE
> values into each project's .bzrignore file, but I don't think that all
> ignores should go into that file.  To me there is a division of rules
> that affect the current project because of how it is built (such as *.o
> files that derive from *.c files), and rules that ignore files because
> of the tools and/or temp-file names that are personal to the user (such
> as ".*.swp", "CVS", etc.).  So, if folks still think we should create a
> .bzrignore file when "bzr init" is run, I think that it should only
> contain the rules that are for project-oriented generated files.
> 
> One way to handle this division would be to honor a file named
> ~/.bazaar/ignore that lets each user configure what files they need to
> ignore that are not project specific.  The presence of this file could
> override the inclusion of the DEFAULT_IGNORE rules (or perhaps half of
> the default ignores if they were split into the categories detailed
> above).
> 
> I have added support for the ~/.bazaar/ignore file to my version of bzr,
> and have attached a patch for this.  In this version, the presence of
> this ignore file disables the inclusion of the DEFAULT_IGNORE rules.
> 
> I also attempted to separate the DEFAULT_IGNORE list into my two
> categories, and attached "ignore" for the file that should go into
> ~/.bazaar, and "bzrignore" for the file that should get installed by
> "bzr init" (I had to guess at some of the rules, so I may have mis-
> classified something).
> 
> Finally, two comments about the DEFAULT_IGNORE list in bzrlib/__init__.py:
> There are two rules to ignore *.o, and the .jamdeps line doesn't have a
> trailing comma after the closing single-quote.
> 
> ..wayne..
> 

The problem with per-user ignores is that it becomes very easy to use
them to ignore whatever you want, but then other people grab a copy of
your branch, and suddenly 'bzr add' adds all of the object files.

*I* would like to see customizable defaults. Such that when you do 'bzr
init' it has a default set of ignores that can be customized.

Your patch has an interesting way of handling it. But realize that we
are seriously thinking to change ignores from being a physical file,
into being a 'versioned property', like inventory files are. (Not
directly editable by users, just guaranteed to be remembered).

Robert has a very strong feeling that the files that are ignored need to
be exactly the same as what they used to be. (So even though bzr has
been upgraded, it will still ignore the same things when you check out
revision 1 of your project).

Also, to be merged, your changes would need tests.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060510/77db5cc5/attachment.pgp 


More information about the bazaar mailing list