selective commit sometimes fails with `parent_id not in inventory` error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Low
|
Robert Collins |
Bug Description
I got this error ar least twice. I don't know how to reproduce it on a little tree, but every time this error happened my tree contains newly added dirs, renamed and modified files and simply modified files. When I try to do selective commit (i.e. only one file from all changes) I got error:
G:\work\
Committing revision 16 to "G:/work/
modified setup.py
bzr: ERROR: bzrlib.
Traceback (most recent call last):
File "E:\Bazaar\
return run_bzr(argv)
File "E:\Bazaar\
ret = run(*run_argv)
File "E:\Bazaar\
return self.run(
File "E:\Bazaar\
author=author)
File "E:\Bazaar\
return unbound(self, *args, **kwargs)
File "E:\Bazaar\
result = WorkingTree3.
File "E:\Bazaar\
return unbound(self, *args, **kwargs)
File "E:\Bazaar\
revprops=
File "E:\Bazaar\
self.
File "E:\Bazaar\
self.
File "E:\Bazaar\
parent_id, definitely_changed, existing_ie, report_changes)
File "E:\Bazaar\
path, self.work_tree)
File "E:\Bazaar\
self.
File "E:\Bazaar\
raise BzrError("parent_id {%s} not in inventory" %
BzrError: parent_id {srccommon-
bzr 0.92.0dev0 on python 2.4.4.final.0 (win32)
arguments: ['E:\\Bazaar\
The same in 0.91rc2 and 0.90, but 0.18 works OK.
I think it's *regression*.
OK, I found sequence of commands to reproduce this bug. It's seems that this bug introduced by Ian by his functions _update_ builder_ with_changes and friends, that build new inventory for commit from scratch.
bzr init
bzr mkdir dir
echo foo > dir/a
echo hello > test
bzr add
bzr ci -m 1
bzr mv dir/a a
echo foo > test
bzr ci test
Committing revision 2 to "E:/temp/1/a/". 3406-s42m3ymzg3 wafkme- 1} not in inventory
bzr: ERROR: parent_id {dir-2007091712
This reminds me bugs in 0.15/0.16 that depends on alphabetical sorting of entries in inventory. Because I renamed file 'a' and now this file appears before it's old parent 'dir'. From this point error message makes sense: parent_id indeed not in inventory yet, because it's not processed yet.