[RFC] Ignore lists
Martin Pool
mbp at canonical.com
Fri Jul 7 04:51:59 BST 2006
On 6 Jul 2006, Jelmer Vernooij <jelmer at samba.org> wrote:
> > For Subversion, for example, there ought to be something in the delta
> > that describes the way the svn:ignore properties changed... If that had
> > changed the delta shouldn't be empty...
> We could teach RevisionTree and compare_trees about file properties and
> then change the 'meta_modified' flag in Delta if any of the properties
> changed. However, this makes it hard to compare trees that come from
> different repository formats - for example, comparing two indentical
> trees from Subversion and Bazaar with the same ignores will still result
> in a non-empty delta.
If you consider three trees
#1- bzr tree containing .bzrignore
#2- svn tree containing a .bzrignore file
#3- svn tree without .bzrignore but with svn:ignore
I would say there's no delta between the first two, but there is a delta
between the second two, which needs to remove the bzrignore and add the
property. However, the first two will have different behaviour in
ignoring files, because they apply different rules.
It's tough to get the right tradeoff, and more your department than
mine, but this seems right. Applying the deltas ought to get the trees
to contain the same contents; how ignore rules are evaluated is at a
different level.
This view is consistent with the idea that deltas are essentially
transforms between trees, and the ignore rules are bytes not objects,
which is pretty much how bzr (to date) and svn work. You could say that
ignore rules are really smart objects, and so changes should be
expressed at a more abstract level that can be carried between the two
systems, but that seems significantly harder.
--
Martin
More information about the bazaar
mailing list