[MERGE][Bug #45719] Allow update command to specify a revision

Scott Scriven bzr at toykeeper.net
Sat Aug 30 18:08:37 BST 2008


* Mark Hammond <mhammond at skippinet.com.au> wrote:
> I've resurrected a very old bug and branch that gives a '-r' 
> option to 'bzr up'.
> 
> For an example of why this is expected by users:
> <any_other_vcs> up -rREV
> bzr up -rREV <-- only one that doesn't work. =(

I'd love to see this feature included.  I'm a big fan of UI 
consistency, and this seems like something a lot of users trip 
over.  In bzr, it's not terribly obvious what the answer is for 
"how do I get an old version back?"

I think the only time I've ever used 'bzr up' was when I tried to 
do 'bzr up -rREV'.  It didn't work, of course, so I checked 'bzr 
help up' and discovered that 'update' does absolutely nothing I 
care about.

As far as I can tell, bzr doesn't actually have the equivalent of 
'hg up -rREV'.  However, 'bzr revert -rREV' is close enough 
sometimes.  It's not as intuitive or easy to type as 'up', but it 
works for looking at old files.

What's different is that 'revert' doesn't allow implicit 
branching.  It should be possible to start a new line of 
development by doing:

  bzr up -r-10
  (hack, hack, hack)
  bzr commit

In this case, merging with the original branch is less intuitive 
than I'd like, but not terribly unlike hg:

  bzr heads --all
  bzr merge -r revid:foo .

Even svn allows selecting branch points with 'up':

  svn up -r 123
  svn cp . svn://server/repo/branches/foo
  svn switch svn://server/repo/branches/foo


Anyway, just a long way of saying I think adding '-r' to 'up' 
would be a beneficial UI change.


-- Scott



More information about the bazaar mailing list