~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

Start addressing Andrew's concerns.

* bzrlib/tests/test_conflicts.py:
(TestParametrizedResolveConflicts): Add a docstring.
(TestResolvePathConflictBefore531967.assertPathConflict): Really
inject the old fashioned conflict object.

* bzrlib/merge.py:
(Merge3Merger._merge_names): Better explain why we shouldn't
generate helpers at this point.
(Merge3Merger.cook_conflicts): Be more verbose when failing.

* bzrlib/conflicts.py:
(PathConflict._resolve): Be more verbose when failing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1229
1229
        if name_winner == "this" and parent_id_winner == "this":
1230
1230
            return
1231
1231
        if name_winner == 'conflict' or parent_id_winner == 'conflict':
1232
 
            # Creating helpers here cause problems down the road if a
1233
 
            # ContentConflict needs to be created so we should not do that
 
1232
            # Creating helpers (.OTHER or .THIS) here cause problems down the
 
1233
            # road if a ContentConflict needs to be created so we should not do
 
1234
            # that
1234
1235
            trans_id = self.tt.trans_id_file_id(file_id)
1235
1236
            self._raw_conflicts.append(('path conflict', trans_id, file_id,
1236
1237
                                        this_parent, this_name,
1574
1575
                c = _mod_conflicts.Conflict.factory(conflict_type,
1575
1576
                                                    path=path, file_id=file_id)
1576
1577
            else:
1577
 
                raise AssertionError()
 
1578
                raise AssertionError('bad conflict type: %r' % (conflict,))
1578
1579
            self.cooked_conflicts.append(c)
1579
 
 
1580
1580
        self.cooked_conflicts.sort(key=_mod_conflicts.Conflict.sort_key)
1581
1581
 
1582
1582