bzr equivalent of CVS's cvs update -r VERSION

Stefan Monnier monnier at iro.umontreal.ca
Sun Feb 15 21:55:03 GMT 2009


> I just mean checkout out a previous version in the same working directory.
> This shouldn't affect the repository at all.

> Looks like this has been an outstanding issue for a while though...

If you don't care about throwing away your local changes, something along
the lines of the following should work:

   bzr push -r<REV> <foo>
   (cd <foo>; bzr checkout)
   rm -r .bzr/checkout
   mv <foo>/.bzr/checkout .bzr/
   rm -r <foo>
   bzr revert

If you want your local changes to be somehow preserved, you'll have to
work harder.  You can then go back to the "HEAD" revision with "bzr
update".


        Stefan


PS: <foo> should preferably be located inside the same
shared-repository, so that the `push' is cheaper.
PPS: the above probably fails to remove the files that were added since <rev>.




More information about the bazaar mailing list