revspec: Add 'head' keyword to mean revno -1
Bug #84667 reported by
Jari Aalto
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
I find often to want to write:
bzr diff -r 15..head
just to find out that I should have used magic number "-1". Please
add 'head' alias to revspec. This would help people coming from
CVS/SVN/GIT to orientate better to bzr.
well, in cvs/svn/git it is actually known as HEAD, at least I've always seen it capitalized.
At least the file is .git/HEAD and the help for SVN says:
-r [--revision] arg : ARG (some commands also take ARG1:ARG2 range)
A revision argument can be one of:
NUMBER revision number
"{" DATE "}" revision at start of the date
"HEAD" latest in repository
"BASE" base rev of item's working copy
"COMMITTED" last commit at or before BASE
"PREV" revision just before COMMITTED
Also capitalized.
And running "git log head" gives me an error, while "git log HEAD" returns something.
In 'svn' both 'svn log -r HEAD' and 'svn log -r head' work.
I don't really like adding all-caps names, but if this is really about compatibility with other systems, I think we would need HEAD, and can also add "head".