"last:number:branch" revision spec is not the same "revno:-number:branch"

Bug #64999 reported by Andrew Bennetts
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned
Breezy
Triaged
Wishlist
Unassigned

Bug Description

According to http://bazaar-vcs.org/BzrRevisionSpec:

"last:number is the same as -number. last:1 means the last commited revision."

However, while "bzr diff -r revno:-2:path/to/branch..revno:-1:path/to/branch" works when the current working directory is not a branch, "bzr diff -r last:2:path/to/branch..last:1:path/to/branch" doesn't.

The difference in the code appears to be that RevisionSpec_last doesn't override needs_branch(), but RevisionSpec_revno does.

In fact, given that "last:" is defined in the documentation in terms of being the same as "revno:", except for negating the number, I'm surprised the code doesn't define RevisionSpec_last as inheriting from RevisionSpec_revno. The current structure makes it likely that there are other subtle differences (and makes it likely that as the code evolves, more differences will occur).

Tags: revspec
Revision history for this message
John A Meinel (jameinel) wrote :

Arguably, this is just a documentation bug.

last:X doesn't support branch portion last:X:path/to/branch

Changed in bzr:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: added: revspec
removed: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Incomplete
status: Incomplete → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.