Ignore/include

Harald Meland harald.meland at usit.uio.no
Tue Feb 10 11:08:06 GMT 2009


[potsed]

> Ben Finney-2 wrote:
>> 
>>> Is it perhaps not easy to predict what the documentation app will
>>> spit out?
>> 
>> That, in combination with the fact that an ignore patter that matches
>> ‘foo’ will be overridden by ‘bzr add foo’, indicates a better solution
>> AFAICT.
>
> This is not really a solution the output is a selection of
> _[classnames] plus in a simple app there are aprox 100 files in
> various dirs which are completely ignored because of the rule, so to
> add each automatically generated new file each time it is run is not
> really a great solution.

Once a particular file has been "bzr add"ed, you won't have to re-add
that same file anymore (even when its name matches an ignore rule --
explicit "bzr add"ing a file overrides the ignore rules).

> simply put i think it would be a great feature to have in .bzrignore:
> [pattern] except [exception]

You've stated what your [pattern] is, but not what you would like the
[exception] to be.  If you say what pattern you'd like to use as your
[exception], people might be able to help you formulate a (somewhat
intricate) [pattern] that implies that exception.

Or, to state this another way: Using regexp rules, bzr can probably
already do what you want -- although the rules won't necessarily be
very easy to read for humans.

> if i am wrong and there is a way to add all ignored files in a
> specific dir in a single command then that is great, please let me
> know how.

I guess something like

  bzr ls --ignored | grep '^specific/directory/' | xargs bzr add

ought to do the trick.
-- 
Harald



More information about the bazaar mailing list