bzr.dev dirstate can't revert/remove-tree after removed merge conflict
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Aaron Bentley |
Bug Description
This bug does NOT occur with 0.16, knit or dirstate.
This does not occur on bzr.dev with knit.
This DOES occur with bzr.dir with dirstate.
#!/bin/sh -x
bzr="/usr/
# Create initial branch
#${bzr} init --format=knit A
${bzr} init A
(
cd A ;
mkdir a ;
touch a/b ;
${bzr} add ;
${bzr} ci -m 'add A'
)
# Branch it and create a new a/ and a/b
${bzr} branch A B
(
cd B ;
${bzr} rm --force a ;
mkdir a ;
touch a/b ;
${bzr} add ;
${bzr} ci -m 'redo in B'
)
# Change stuff in A
(
cd A ;
echo 'changes' > a/b ;
${bzr} ci -m 'change A'
)
# Merge the changes. Remove the re-added copy of A's a/b.OTHER, and try
# to revert or remove-tree.
(
cd B ;
${bzr} merge ;
rm a/b.OTHER ;
${bzr} revert ; # Fails
${bzr} remove-tree # Fails
)
# 'bzr resolve'ing the conflict doesn't help; revert and rm-tree still fail
Changed in bzr: | |
assignee: | nobody → aaron-bentley |
status: | Unconfirmed → Fix Committed |
Changed in bzr: | |
importance: | Undecided → High |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
fullermd wrote:
> This bug does NOT occur with 0.16, knit or dirstate.
> This does not occur on bzr.dev with knit.
> This DOES occur with bzr.dir with dirstate.
My tests show that this bug was introduced in revno 2499:
(John Arbash Meinel, r=robert) Tweak _iter_changes and update_entry to
make bzr status and bzr diff much faster
Here are the relevant tracebacks:
bzr: ERROR: exceptions.OSError: [Errno 2] No such file or directory: abentley/ foo/B/a/ b.OTHER'
'/home/
Traceback (most recent call last): abentley/ bzr/bzr. dev/bzrlib/ commands. py", line 718, in catch_errors abentley/ bzr/bzr. dev/bzrlib/ commands. py", line 679, in run_bzr abentley/ bzr/bzr. dev/bzrlib/ commands. py", line 375, in **all_cmd_ args) abentley/ bzr/bzr. dev/bzrlib/ builtins. py", line 2903, in run changes= True) abentley/ bzr/bzr. dev/bzrlib/ mutabletree. py", line 38, in abentley/ bzr/bzr. dev/bzrlib/ workingtree. py", line 1864, in abentley/ bzr/bzr. dev/bzrlib/ transform. py", line 1424, in abentley/ bzr/bzr. dev/bzrlib/ transform. py", line 1452, in tree.merge_ modified( ) abentley/ bzr/bzr. dev/bzrlib/ decorators. py", line 127, in abentley/ bzr/bzr. dev/bzrlib/ workingtree. py", line 864, in file_sha1( file_id) : abentley/ bzr/bzr. dev/bzrlib/ workingtree_ 4.py", line 417, file_abspath) abentley/ foo/B/a/ b.OTHER'
File "/home/
run_bzr_
return run_bzr(argv)
File "/home/
ret = run(*run_argv)
File "/home/
run_argv_aliases
return self.run(
File "/home/
not no_backup, pb, report_
File "/home/
tree_write_locked
return unbound(self, *args, **kwargs)
File "/home/
revert
report_changes)
File "/home/
revert
filenames, backups)
File "/home/
_alter_files
merge_modified = working_
File "/home/
read_locked
return unbound(self, *args, **kwargs)
File "/home/
merge_modified
if text_hash == self.get_
File "/home/
in get_file_sha1
stat_value = os.lstat(
OSError: [Errno 2] No such file or directory:
'/home/
bzr 0.17.0dev0 on python 2.4.1.final.0 (linux2) abentley/ bin/bzr' , '-Derror', 'revert']
arguments: ['/home/
** please send this report to <email address hidden> bin/bzr -Derror remove-tree abentley/ foo/B/a/ b.OTHER'
+ /home/abentley/
bzr: ERROR: exceptions.OSError: [Errno 2] No such file or directory:
'/home/
Traceback (most recent call last): abentley/ bzr/bzr. dev/bzrlib/ commands. py", line 718, in catch_errors abentley/ bzr/bzr. dev/bzrlib/ commands. py", line 679, in run_bzr abentley/ bzr/bzr. dev/bzrlib/ commands. py", line 375, in **all_cmd_ args) abentley/ bzr/bzr. dev/bzrlib/ builtins. py", line 273, in run workingtree( ) abentley/ bzr/bzr. dev/bzrlib/ bzrdir. py", line 1075, in abentley/ bzr/bzr. dev/bzrlib/ mutabletree. py", line 38, in abentley/ bzr/bzr. dev/bzrlib/ workingtree. py", line 1864, in abentley/ bzr/bzr. dev/bzrlib/ transform. py", line 1424, in
File "/home/
run_bzr_
return run_bzr(argv)
File "/home/
ret = run(*run_argv)
File "/home/
run_argv_aliases
return self.run(
File "/home/
d.destroy_
File "/home/
destroy_workingtree
wt.revert([], old_tree=empty)
File "/home/
tree_write_locked
return unbound(self, *args, **kwargs)
File "/home/
revert
report_changes)
File "/home/
revert
filenames, backups)
File "/home...