InconsistentDelta by recreating a known ID in a new location
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Unassigned |
Bug Description
Running against bzrlib 1.10rc1, the below reproducer results in the error shown:
#######
$ python test.py
Standalone tree (format: pack-0.92)
Location:
branch root: .
No handlers could be found for logger "bzr"
Traceback (most recent call last):
File "/tmp/bzr-
wt.
File "<string>", line 4, in commit_write_locked
File "/usr/lib/
result = WorkingTree3.
File "<string>", line 4, in commit_write_locked
File "/usr/lib/
*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
'The entry was considered a rename, but the source path'
bzrlib.
reason: The entry was considered a rename, but the source path is marked as absent.
#######
#######
#!/usr/bin/env python
import os
import tempfile
import shutil
import bzrlib.commands
import bzrlib.workingtree
temp_dir = tempfile.
try:
# initial setup
wt = bzrlib.
# create a directory dir and a file dir/A
f = open('file-A', 'w')
f.close()
# now remove and recreate, with id A on a file in location B (should be a move)
f = open('file-B', 'w')
f.close()
# and try to commit
finally:
#######
Changed in bzr: | |
importance: | Undecided → High |
status: | New → Confirmed |
description: | updated |
Changed in bzr: | |
status: | Confirmed → Fix Released |
Running "bzr check" before the commit indicates that the tree is in a bad state:
[ 3522] 2009-01-06 17:05:40.210 INFO: Checking working tree at 'file:/ //tmp/bzr- test-dirtkmJUN/ '. cduffy/ public_ html/bzr/ bzr.cduffy.bug314251/bzrlib/ commands. py", line 893, in run_bzr_ catch_errors cduffy/ public_ html/bzr/ bzr.cduffy.bug314251/bzrlib/ commands. py", line 839, in run_bzr cduffy/ public_ html/bzr/ bzr.cduffy.bug314251/bzrlib/ commands. py", line 539, in run_argv_aliases **all_cmd_ args) cduffy/ public_ html/bzr/ bzr.cduffy.bug314251/bzrlib/ builtins. py", line 2533, in run dwim(path, verbose, do_branch=branch, do_repo=repo, do_tree=tree) cduffy/ public_ html/bzr/ bzr.cduffy.bug314251/bzrlib/check.py", line 283, in check_dwim cduffy/ public_ html/bzr/ bzr.cduffy.bug314251/bzrlib/ decorators. py", line 138, in read_locked cduffy/ public_ html/bzr/ bzr.cduffy.bug314251/bzrlib/ workingtree. py", line 2495, in _check _validate( ) cduffy/ public_ html/bzr/ bzr.cduffy.bug314251/bzrlib/ decorators. py", line 138, in read_locked cduffy/ public_ html/bzr/ bzr.cduffy.bug314251/bzrlib/ workingtree_ 4.py", line 1269, in _validate _dirstate. _validate( ) cduffy/ public_ html/bzr/ bzr.cduffy.bug314251/bzrlib/ dirstate. py", line 2677, in _validate xxxxxxxxxxxxxxx xxx'), ('a', '', 0, False, '')]) inconsistent with previous path None seen at 'file-A'
0.181 Traceback (most recent call last):
File "/home/
return run_bzr(argv)
File "/home/
ret = run(*run_argv)
File "/home/
return self.run(
File "/home/
check_
File "/home/
tree._check()
File "/home/
result = unbound(self, *args, **kwargs)
File "/home/
self.
File "/home/
result = unbound(self, *args, **kwargs)
File "/home/
self.
File "/home/
(entry, previous_path, previous_loc))
AssertionError: entry (('', 'file-B', 'id-A'), [('f', '', 0, False, 'xxxxxxxxxxxxxx