~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 4597.7.11.

Fix #531967 by creating helpers for PathConflicts when a deletion
is involved.

* bzrlib/tests/test_conflicts.py:
(TestParametrizedResolveConflicts.mirror_scenarios): Renamed from
multiply_scenarios to make the intent clearer. Turned into a
classmethod too for the same reason.
(TestParametrizedResolveConflicts.scenarios): Now a classmethod.

* bzrlib/merge.py:
(Merge3Merger._merge_names): 'name conflict' and 'parent conflict'
can (and must) be handled in the same way. If a deletion is
involved we create an unversioned copy of the rejected item so the
user can restore that easily.
(Merge3Merger.cook_conflicts): Get rid of 'name conflict', 'parent
conflict' distinction and just create PathConflicts with a file_id
to address bug #531967.

* bzrlib/conflicts.py:
(PathConflict.associated_filenames): Helpers exist only when a
deletion is involved.
(PathConflict._resolve): We may have to version one path
again. This may happen when a deletion have occurred.
(PathConflict.action_take_this, PathConflict.action_take_other):
As a special case, we may have an helper to use when deletion was
involved.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: