Undo command?

Nicholas Allen allen at ableton.com
Tue Dec 12 16:54:01 GMT 2006


> No it's not.  It also gets rid of uncommitted changes.  In fact, that's
> its primary purpose.  So the rest of your email is based on an incorrect
> statement.
I was thinking that if you provide the --back-to option it would also 
revert the uncommitted changes. If you don't provide a revision or 
revision range then it would revert the local changes. If you provide a 
revision range then it would be only reverting those revisions and not 
the local changes.
 eg:

bzr revert file                       - revert local changes made in file
bzr revert --back-to 10 file  - revert file back to revision 10 and 
loose local changes made to file
bzr revert -r 10,13 file         - revert the changes made in revisions 
10 and 13 only (keep local changes)
bzr revert -r 10..13 file        - revert changes made in revisions 10, 
11, 12 and 13 (keep local changes)

To me at least that seems quite intuitive and still provides all the 
existing functionality of revert.

But perhaps -r would be a bit misleading (as it is change sets that you 
revert) and --changes would be better.

Nick




More information about the bazaar mailing list