diff -r-2..-1 for branch with one revision is confusing
Bug #76765 reported by
Marius Kruger
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned | ||
Breezy |
Triaged
|
Low
|
Unassigned |
Bug Description
bzr init
echo "test" > someFile.txt
bzr add someFile.txt
bzr commit -m "initial commit"
bzr diff -r-2..-1 #doesn't show changes
bzr diff -r0..-1 #does show changes
This was unexpected and I believe that they should behave the same
if there is currently only one committed revision
description: | updated |
tags: | added: diff |
tags: | added: revno |
tags: | added: check-for-breezy |
tags: |
added: revspec removed: check-for-breezy |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Medium |
importance: | Medium → Low |
To post a comment you must log in.
At the moment, negative numbers are trapped at 1. So if you a slightly longer branch (say 5 revisions) you can do:
bzr log -r -10..-1
And it will print out all 5 revisions.
The impedance mismatch is because 'bzr diff' is showing the difference from X to Y, while log is showing everything from X to Y *inclusive*.
So there is no 'bzr log -r 0' because that isn't a revision. But there is a diff -r 0, because that is the Null revision.
I'm not sure how to reconcile this, but I can agree that it is a little confusing/ inconsistent.