bzr add

Martin Pool martinpool at gmail.com
Wed Aug 24 01:47:11 BST 2005


On 8/24/05, Robey Pointer <robey at lag.net> wrote:
> It looks like "bzr add <folder>" adds not just the folder, but
> everything in it.  But sometimes I only want to add *some* things in
> the folder (for example, not .pyc files).  bzr is giving an error on
> attempts to do these partial adds:
> 
> $ ../bzr.dev/bzr add templates/*.tal
> bzr: error: [u'templates']
> 
> The oldest copy of bzr I currently have is @1067, and it's happening
> at least as far back as that.
> 
> There are two possible solutions:
> 1. "bzr add <folder>" adds just the folder, not its contents.  This
> follows the principle of least astonishment since that's what other
> RCS do.

Note that recursive add does not add files matching an ignore pattern,
so you won't need to worry about .pyc files.  If you add more patterns
to .bzrignore they'll be respected.

If you do add a file you didn't want, you can do bzr remove.

> 2. "bzr add <new-folder>/<file>" automatically adds any missing
> intermediate folders.
> 
> I actually like #2 best.

Yes; I think there is a patch from mpe to do this, which I should put
in.  If anyone would like to write/update this and include test cases
that would be great.

-- 
Martin




More information about the bazaar mailing list