[MERGE] Remove the basis_tree parameter to record_iter_changes.

James Westby jw+debian at jameswestby.net
Fri Mar 20 05:53:12 GMT 2009


On Wed, 2009-03-18 at 13:01 +1100, Robert Collins wrote:
> Why isn't this used by commit.py yet? Well, for xml based inventories
> the dirstate is a much better place to get parent information - its
> already there - and accessing inventories isn't that cheap. For CHK
> based inventories, its extremely cheap to get a delta between the basis
> and all the pending merges, so we only want to use this when the
> repository is a CHK based repository (or other repository where it will
> be faster than the current code).

The other night I did a hacksaw job of making commit.py use (a slightly
older version of) this code. Some things that I noted along the way.

  * There was no reporting of the changes. It seems like 
    record_iter_changes should do this, to save 2 passes over the 
    changes.

  * There is no way to specify the exclude list to Tree.iter_changes, so
    this either needs to be layered on top by converting to  
    specific_files (bad), iter_changes extended, or record_iter_changes
    made to exclude them.

  * The current commit code expends some effort to go from 
    specific_files to specific_file_ids, that doesn't seem totally 
    redundant:

> # If provided, ensure the specified files are versioned

  * Tree.add(['a/b']) where 'a' is not added leads to an iter_changes
    that just adds 'a/b' without adding 'a', and the current code fails
    to commit this as it never adds the parent. Something needs to 
    change here.

You may already have answers to all this, but I thought my 
investigations may save you some time. Thanks for working on this,
I look forward to making use of it soon.

Thanks,

James




More information about the bazaar mailing list