KeyError: 'new-2' from resolve --take-other
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Vincent Ladeuil |
Bug Description
bzr init-repo r
cd r
bzr init a
mkdir a/dir
echo foo > a/dir/file
bzr add a/dir
bzr commit -m one a
bzr clone a b
echo bar > b/dir/file
rm -r a/dir
bzr commit -m two a
bzr pull -d b
cd b
bzr resolve --take-other
deleted dir/file.THIS
deleted dir
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "bzr.dev/
return the_callable(*args, **kwargs)
File "bzr.dev/
ret = run(*run_argv)
File "bzr.dev/
return self.run(
File "bzr.dev/
return self._operation
File "bzr.dev/
self.cleanups, self.func, *args, **kwargs)
File "bzr.dev/
result = func(*args, **kwargs)
File "bzr.dev/
before, after = resolve(tree, file_list, action=action)
File "bzr.dev/
conflict.
File "bzr.dev/
meth(tree)
File "bzr.dev/
self.
File "bzr.dev/
op.
File "bzr.dev/
self.cleanups, self.func, *args, **kwargs)
File "bzr.dev/
result = func(*args, **kwargs)
File "bzr.dev/
parent_tid = tt.get_
File "bzr.dev/
path = self._tree_
KeyError: 'new-2'
bzr 2.4.0dev3 on python 2.7.1 (Linux-
arguments: ['bzr.dev/bzr', '--no-plugins', 'resolve', '--take-other']
plugins:
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.utf8'
Related branches
- John A Meinel: Approve
-
Diff: 127 lines (+56/-21)4 files modifiedbzrlib/conflicts.py (+18/-7)
bzrlib/tests/blackbox/test_resolve.py (+38/-0)
bzrlib/tests/test_revert.py (+0/-9)
bzrlib/workingtree.py (+0/-5)
Changed in bzr: | |
status: | Confirmed → In Progress |
Changed in bzr: | |
milestone: | none → 2.4b4 |
status: | In Progress → Fix Released |
Sorry for the delay and so many thanks for the reproducing recipe !
I'll look into it asap.
'bzr resolve --take-other' with no files specified is obviously badly supported. I wonder if we should just ban it until the multiple conflicts involving one file tricky cases are all properly handled...
In this particular case, doing:
bzr resolve dir/file --take-other
bzr resolve dir --take-other
works.
I realize you isolated the recipe from a more complex case where this workaround won't help though.