dirstate.set_state_from_inventory is broken with forward-edits.
Bug #395556 reported by
Martitza
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Robert Collins |
Bug Description
bzr init t1
cd t1
touch 2
bzr add 2
bzr mv 2 1
bzr commit -m "call it 1"
bzr mv 1 2
At this point the dirstate is corrupt (bzr check should report this; tree._validate() does report it.
If we attempt to commit, we will get a traceback like the one reported below by Martitza in a comment on 2009-07-04. That is,
bzr commit -m "call it 2"
gives the traceback shown in the following comment.
Related branches
lp://staging/~lifeless/bzr/bug-395556
- John A Meinel: Needs Fixing
- Diff: 284 lines (has conflicts)
tags: | added: commit dirstate inventory |
tags: | removed: commit inventory |
summary: |
- bzr mv (rename in place) causes commit to fail depending on specific - filenames + bzr mv (rename in place) can corrupt dirstate with specific ordering |
description: | updated |
summary: |
- bzr mv (rename in place) can corrupt dirstate with specific ordering + dirstate.set_state_from_inventory is broken with forward-edits. |
Changed in bzr: | |
status: | Confirmed → Fix Committed |
assignee: | nobody → Robert Collins (lifeless) |
status: | Fix Committed → Confirmed |
Changed in bzr: | |
status: | Confirmed → Fix Committed |
Changed in bzr: | |
milestone: | none → 1.18 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The traceback follows. The file has zero length because I used 'touch' to craete the file but this is not relevant to the bug.
[15575] 2009-07-03 19:20:06.957 INFO: aborting commit write group: DuplicateFileId (File id {2-200907040219 57-hr4tovbq40td m0ia-1} already exists in inventory as InventoryFile( '2-200907040219 57-hr4tovbq40td m0ia-1' , '1', parent_ id='TREE_ ROOT', sha1='da39a3ee5 e6b4b0d3255bfef 95601890afd8070 9', len=0, <email address hidden>)) python2. 6/dist- packages/ bzrlib/ commands. py", line 729, in exception_ to_return_ code python2. 6/dist- packages/ bzrlib/ commands. py", line 924, in run_bzr python2. 6/dist- packages/ bzrlib/ commands. py", line 560, in run_argv_aliases **all_cmd_ args) python2. 6/dist- packages/ bzrlib/ builtins. py", line 2937, in run safe_relpath_ files(tree, exclude)) python2. 6/dist- packages/ bzrlib/ decorators. py", line 192, in write_locked python2. 6/dist- packages/ bzrlib/ workingtree_ 4.py", line 226, in commit commit( self, message, revprops, *args, **kwargs) python2. 6/dist- packages/ bzrlib/ decorators. py", line 192, in write_locked python2. 6/dist- packages/ bzrlib/ mutabletree. py", line 228, in commit python2. 6/dist- packages/ bzrlib/ commit. py", line 371, in commit builder. finish_ inventory( ) python2. 6/dist- packages/ bzrlib/ repository. py", line 212, in finish_inventory python2. 6/dist- packages/ bzrlib/ repository. py", line 1063, in add_inventory_ by_delta inv.apply_ delta(delta) python2. 6/dist- packages/ bzrlib/ inventory. py", line 1169, in apply_delta add(new_ entry) python2. 6/dist- packages/ bzrlib/ inventory. py", line 1259, in add _byid[entry. file_id] ) 57-hr4tovbq40td m0ia-1} already exists in inventory as InventoryFile( '2-200907040219 57-hr4tovbq40td m0ia-1' , '1', parent_ id='TREE_ ROOT', sha1='da39a3ee5 e6b4b0d3255bfef 95601890afd8070 9', len=0, <email address hidden>)
0.153 Traceback (most recent call last):
File "/usr/lib/
return the_callable(*args, **kwargs)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
exclude=
File "/usr/lib/
result = unbound(self, *args, **kwargs)
File "/usr/lib/
result = WorkingTree3.
File "/usr/lib/
result = unbound(self, *args, **kwargs)
File "/usr/lib/
*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
self.parents)
File "/usr/lib/
basis_
File "/usr/lib/
self.
File "/usr/lib/
self.
DuplicateFileId: File id {2-200907040219