[RFC] Ignore lists

Jelmer Vernooij jelmer at samba.org
Thu Jul 6 03:23:34 BST 2006


On Thu, 2006-07-06 at 12:10 +1000, Martin Pool wrote:
> On  5 Jul 2006, Jelmer Vernooij <jelmer at samba.org> wrote:
> 
> > At the moment, '.bzrignore' is a magic file containing the ignore list
> > that is assumed to be present in every revision that has ignores.
> > However, this file might not be present in all formats, as other formats
> > might be using different ways of obtaining an ignore list.
> > 
> > WorkingTree already contains a `get_ignore_list()' function that, in the
> > default implementation, just reads .bzrignore but can be overridden to
> > obtain the ignore list in some other way.
> > 
> > It would be nice if the dependency on a `magic' file could be removed,
> > to be able to support ignore lists from foreign branches. Instead, I
> > think ignores should be in a control file and Repository should have a 
> > get_ignore_list(revid) function. CommitBuilder would have to have a
> > set_ignore_list() function.
> > 
> > The WorkingTree could use this function to obtain a list of ignores to
> > write to its control file (.bzrignore or something else).
> > 
> > I realize making the ignore list a control file would break the current
> > format, but I think making the API changes can already be done.
> There seem to be a couple of issues here.
> 
> Adding a Repository.get_ignore_list(revid), or (perhaps better?)
> RevisionTree.get_ignore_list() seems fine and uncontroversial to me.
> Eventually perhaps they will need to return some kind of smarter object
> that can apply the rules in different ways consistent with the system
> they're coming from, but we don't need to do that now.
The main issue with adding it to RevisionTree is that it (to me) implies
that two revision trees with different ignore list when passed to
compare_trees() should generate a non-empty Delta. 

For Bazaar RevisionTree's that would work, but for systems like
Subversion that an ignore list that is not part of the RevisionTree,
it's more difficult. I guess we could add a 'ignorelist_modified' bit to
Delta, but that's rather ugly, imho.

> Would you then propose to not store .bzrignore in the commit?  It's
> something that's purely managed by the working tree?  (And different
> working trees could potentially keep the list somewhere else?)  That's
> attractive in some ways - it removes the binding from how something is
> presented to how its stored.
Yes, indeed. 

Cheers,

Jelmer
-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
-------------- 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/20060706/2da400c3/attachment.pgp 


More information about the bazaar mailing list