revspec: Add 'head' keyword to mean revno -1

Bug #84667 reported by Jari Aalto
2
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.

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

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".

Changed in bzr:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Jari Aalto (jari-aalto) wrote :

Kindly keep the names in small letters, because the other revspec items use small letters as well
(cf. "bzr help revisionspec"). It's easier to type as well.

The format or revision range -rX..Y is also different from e.g. SVN's -rX:Y, to using
small letters in revspec is fine (similar small deviation from the SVN/GIT).

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
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.