switching working copy to earlier version

Asked by Parth Malwankar

Hello,

Is it possible to switch my working copy to an earlier revision?
I know I can do:

$ bzr branch -r N from_dir to_dir

but I was wondering if its possible to switch in place to an
earlier revision for a quick inspection.

$ bzr <command> -r N

Thanks.
Parth

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
John A Meinel
Solved:
Last query:
Last reply:
Revision history for this message
Best John A Meinel (jameinel) said :
#1

you can do:
'bzr revert -r N'

if you just want to see the contents, but at that point "bzr status" will show the changes.

You can also do "bzr pull . -r N --overwrite" to force the move, but at that point it is difficult to get back to the original place on the branch.

There is also a proposed patch:
https://code.edge.launchpad.net/~mhammond/bzr/update-r/+merge/6980

Which would provide "bzr update -r N", which would then set your *working tree* to revision N, but leave the Branch pointer alone. (so bzr update -r N; bzr update returns you to where you were)

Revision history for this message
Parth Malwankar (parthm) said :
#2

Thanks explaining all the options John.
I look forward to the "update -r" approach being integrated into bzr.

Revision history for this message
Parth Malwankar (parthm) said :
#3

Thanks John A Meinel, that solved my question.