Comment 0 for bug 187207

Revision history for this message
Spencer E. Chastain (sechastain) wrote : commit reports error when a file has been moved and then removed in the same revision

This bug occurs when I (1) pull a child directory up (2) remove the old parent directory and (3) remove a file under the child directory (that was elevated in the tree by the move)

I believe this has severely broken a branch on a private network that I cannot extract data from. However, reproducing the steps in a simple case (such as below) does not break a branch, per se, but it does create an error and seem to put the branch into a weird state between revision 2 and 3.

Either way, it's a problem, and I think it may be creating larger problems in trees where I have been doing much more of this kind of activity.

$ bzr init test
$ cd test
$ mkdir -p del/sub
$ touch del/sub/a
$ touch del/sub/b
$ bzr add
added del
added del/sub
added del/sub/a
added del/sub/b
$ bzr commit -m "setup"
Committing to: /home/sechastain/workspace/test/
added del
added del/sub
added del/sub/a
added del/sub/b
Committed revision 1.

$ bzr mv del/sub sub
del/sub => sub
$ rmdir del
$ rm sub/b

$ bzr commit -m "break"
Committing to: /home/sechastain/workspace/test/
missing del
renamed del/sub => sub
missing sub/b
deleted del
deleted del/sub/b
bzr: ERROR: dirstate: inconsistent delta, with tree 0. 'del/sub/b' 'b-20080130013519-454g97znowa6cvkh-4'

$ bzr status
removed:
  del/
  del/sub/b
renamed:
  del/sub => sub

$ bzr commit -m "break"
Committing to: /home/sechastain/workspace/test/
renamed del/sub => sub
missing sub/b
deleted del
deleted del/sub/a
deleted del/sub/b
Committed revision 3.

$ bzr status
$