log and annotate should work on removed files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
When a file has been removed from the repository, it is very difficult to find out what revision it was removed. The only way I know is parsing 'bzr log -v', which is difficult for the user and a very slow operation (for MySQL, it's too slow to be practical). It would really be useful if it was possible to:
- Get the revision in which the file was removed. I can't think of any better way than to invent a new command, but whatever way you find best is acceptable.
- Use 'bzr log FILE' if FILE is removed.
- Use 'bzr annotate -r <revision where file existed> FILE'.
- If FILE is removed in REV, 'bzr annotate -r X FILE' should print 'file was removed in revision Y' instead of 'FILE is not versioned'.
At the moment, we work in only 'tree snapshots', which means that when a file is deleted, it "just disappears" and we don't record the *delta* of it having been deleted.
This is certainly a limitation of how we are recording information. Though there are a few possibilities...
1) 'bzr log -v' uses a tree comparison between revisions (so looks at the delta, rather than the snapshot). We have a few ideas as to how to make that faster (split-up inventories, recursive hashes, journaled inventories)
2) Consider how to record something that is only a delta (delete) as part of a snapshot. Journaled Inventories might be a way to go about it.
It is certainly a limitation that we run into from time to time.