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

David Clymer david at zettazebra.com
Fri Dec 9 13:29:47 GMT 2005


On Thu, 2005-12-08 at 22:13 -0600, Michael Ellerman wrote:
> 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.
> 

+1

I agree with the problems described here, and even like the
suggested .bzrignore hand-holding. However, I'm not sure that the ignore
command should be removed. Perhaps bzr ignore with no arguments should
open .bzrignore for editing.

-davidc

-- 
gpg-key: http://www.zettazebra.com/files/key.gpg
-------------- 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/20051209/c0f9116d/attachment.pgp 


More information about the bazaar mailing list