Feature Request: bzr add --no-dirs

Jari Aalto jari.aalto at cante.net
Sat Nov 25 07:31:14 GMT 2006


Martin Pool <mbp at canonical.com> writes:

> On 25/11/2006, at 4:24am, Jari Aalto wrote:
> 
> >
> > Consider this:
> >
> >   $ bzr add --no-recurse dir/*
> >
> > Whoops, it also added all directories inside it for adding.
> > It's customary to want to add only files and add directories
> > case-by-case basis, so please implement additional option
> > to ignore files:
> >
> >   $ bzr add --no-dirs --no-recurse dir/*
> >             =========
> >
> > I think there sould be also option for symbolic links:
> >
> >   --no-symlinks
> 
> Can you say more about the case where this would be useful to you?

In a packaging work, you usually download a package and see it it work
okay. Then you attach extra directories to the original
sources to see if packaing works. After these tests you might consider 
the sources good enough for real packging, so you do:

    bzr add package dir/*

But forget that you had those development templates and directories
still around (quilt, patch-system, helper scripts ...).

    package
    |
    +-src
        |
        +-tempates/
        +-patches/
        +-patched/
        +-quilt/
        +-dev-scripts/

If there were --no-dirs, then this would work:

    cd package
    bzr add --no-recurse *
    bzr add --no-recurse src/*

Or could it be make in single line?

    cd package
    bzr add --no-recurse --no-dirs * src/*

Of course one could have started right away with:

    tar -zxvf ..
    <add all to bzr>
    <... and only then hack, hack, attach templates>

But it's not always the case if you want to start that way.

Jari






More information about the bazaar mailing list