[RFC] New ignore schema and properties
Martin Pool
mbp at sourcefrog.net
Fri Feb 10 03:31:24 GMT 2006
On 5 Feb 2006, Jan Hudec <bulb at ucw.cz> wrote:
> Hello All,
>
> I want to discuss some issues about the new ignore schema.
>
> See also http://bazaar.canonical.com/NewIgnoreRulesSpec
>
> The main point is that I'd like to make ignore lists a directory property and
> store it in the inventory. That has some advantages:
>
> * When you rename the directory, the patterns come along.
> * No new weaves need to be introduced and handled.
> * They would still apply recursively, so one can still write them as now and
> attach them to root.
svn doesn't handle recursive patterns, which makes sense in their model
of the whole repo being one tree, but does make it a bit annoying when
there is an output file type created in many subdirectories.
I think you'd still want an option that will handle non-recursive globs.
The current syntax of './foo' might seem a bit strange if it's in a
per-directory file.
I suppose we can treat it not so much as a file with syntax but rather a
list of patterns manipulated by the ignore command.
There are two questions
* should the ignore-specs be in the special file .bzrignore, or in
a property of the directory (or root directory) - I think we agree
a property is cleaner
* should this property be considered as a text string that can
be arbitrarily changed by the user (e.g. to insert comments)
or as a list under our control
> It has some disadvantages too:
>
> * It adds stuff to inventory.weave, which has many revisions and tends to be
> a bottle-neck.
> * Merging has to be implemented for the property.
I think merging will be mostly about UI issues:
- If there are conflicts in properties, how are those conflicts to be
resolved and represented? If it's just .bzrignore it's easy.
- If we treat it as a list we can reconcile the two values to ignore
reorderings, etc.
- If there's a 'bzr ignore --edit' that could show conflicted regions,
and mark the property as resolved when done.
- Presumably we need some way for property conflicts to be shown
in the list of conflicts and to block commits.
> An interesting question also is how it will play with subtree branches. If
> we, one day, want to allow branching subtrees only, how will we propagate the
> ignore patterns? Will it be easier with whole-tree patterns (but absolute
> paths won't work there then) or with per-directory ones?
If we have recursive patterns we'll need to propagate them down to
subdirectories if the subdirectories are split out. That should be
possible.
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060210/17efca4b/attachment.pgp
More information about the bazaar
mailing list