MERGE ping

Martin Pool mbp at sourcefrog.net
Mon Apr 3 10:39:32 BST 2006


On 25 Mar 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> New conflict handling system
> http://patchwork.ozlabs.org/bazaar-ng/patch?id=4686

The concept of tracking them is good; +0.5 on the patch in the current
state.

Rather than treating the conflict list as a set of "lines" perhaps they
should be conflict objects.  We could have a ConflictSet object and
change select_conflicts() into a method on that, perhaps called
remove_all() and remove_paths().  Rather than having conflicts with
different titles, we can just have subclasses of Conflict.
The details of how these are packed can then be part of the workingtree
format.

The methods like "conflict_stanzas" and "stanza_conflicts" could be more
explicit as "conflicts_to_stanzas", etc.


@@ -48,8 +49,11 @@
     See also bzr resolve.
     """
     def run(self):
-        for path in
         WorkingTree.open_containing(u'.')[0].iter_conflicts():
-            print path
+        from bzrlib.workingtree import WorkingTree
+        from transform import conflicts_strings
+        wt = WorkingTree.open_containing(u'.')[0]
+        for conflict in conflicts_strings(wt.conflict_lines()):
+            print conflict
 
Should be 'from bzrlib.transform'.

I don't mind putting this in as a step in the right direction but hope
you'd think those changes are clearer.

-- 
Martin




More information about the bazaar mailing list