.bzrignore and bzr ignore are confusing (was Re: bzr commands taking a filename)

Michael Ellerman michael at ellerman.id.au
Fri Dec 9 04:13:46 GMT 2005


On Thu, 8 Dec 2005 19:54, Aaron Bentley wrote:
> Martin Pool wrote:
> | Saying --pattern 'foo*' might(?) help people remember they
> | need to quote it too.
>
> I think they're independent.  All entries may contain wildcards, whether
> they're tree-wide or refer to a particular path.
>
> e.g.
> subdir/*.pyc
> (specific path, wildcard)
>
> Makefile
> (tree-wide, no wildcard)

Call me an idjiot, but I think .bzrignore and the bzr ignore command as they 
stand are a tad confusing.

I see a few problems:
 - it's not clear how/if entries in .bzrignore apply to subdirectories.
 - it's not clear (given an empty .bzrignore) that you're looking at patterns
 - actually they're not patterns, they're globs.
 - bzr ignore has to be nasty about adding multiple files in order to catch
   the inadvertantly-expanded glob case.
 - I don't think it's obvious what this should do:
   # cd subdir
   # bzr ignore file-in-subdir

I'm thinking out loud here but .. how about:

1. bzr ignore no longer exists, to ignore files you edit .bzrignore.
2. We change the format of .bzrignore to be more explicit.
3. bzr init creates a template .bzrignore with helpful comments.

eg.

# This file tells bzr which files to ignore in your working tree.
# Entries in this file can be either file or path names, or patterns.
# <short description of pattern syntax for newbies>

[Global]
# Entries in this section apply to your entire tree.
# For example the following entry will cause all files in the tree
# named "junk.o" to be ignored:
# junk.o

[Local]
# Entries in this section only apply to files that match the full
# path you specify. For example the following entry will cause all files
# ending in .o in the directory "subdir" to be ignored:
# subdir/*.o

OK, maybe that's a bit hand-holdy, but I think we need to do something to make 
it more useable.

cheers

-- 
Michael Ellerman
IBM OzLabs

email: michael:ellerman.id.au
inmsg: mpe:jabber.org
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051208/7e50bdf4/attachment.pgp 


More information about the bazaar mailing list