tree transform is malformed ??

Aaron Bentley abentley at
Mon May 1 07:17:56 BST 2006

Robert Collins wrote:
> On Mon, 2006-05-01 at 00:37 -0400, Aaron Bentley wrote:
> You've hit the nail on the head. That is indeed the case, because I
> hadn't properly cleaned the tree.
> So, conflict wise, how about the checkout does a merge from the Tree on
> disk to the RevisionTree being constructed ?

Merge only has an effect on versioned files, not unversioned ones.  Are 
you proposing that checkout should work when there's already an existing 
checkout on disk?  Because that sounds more like 'update' than 
'checkout' to me.

If you're not proposing permitting checkouts in trees with versioned 
files, then merge will do nothing different from build_tree, except for 
conflict resolution.  But it's far simpler to just change build_tree to 
do conflict resolution.  It also means you don't have to handle 
conflicts that build_tree can never produce.  Here's the relevant 
section from revert():

         child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
             raw_conflicts = resolve_conflicts(tt, child_pb)
         conflicts = cook_conflicts(raw_conflicts, tt)
         for conflict in conflicts:

The meat is: call resolve_conflicts(), to resolve the conflicts and get 
a list of the raw conflicts that were encountered, and the resolutions 
done.  Call cook_conflicts to get a list of Conflict objects, which can 
be converted to strings and/or saved in the the working tree.  Emit the 
conflicts as warnings.


More information about the bazaar mailing list