tags:

views:

753

answers:

2
+6  Q: 

undo bzr revert

I accidentally reverted all my changes with bzr revert before committing. Are all my changes lost or can I undo the revert somehow?

I haven't lost many changes, but I'd enjoy to know if there is a safety net against this. Google does not help with "undo bzr revert".

+6  A: 

Ok, apparently bazaar leaves a file with appended ".~1~" to reverted files, so in order to recover the changes it's simply a cp of this file onto the reverted one.

Stefano Borini
So _that's_ what that ~1~ file was that I found in my dev folder! Thanks, you've just solved a separate mystery for me now!
thomasrutter
+1  A: 

It increments the number each time.

The first time you revert a file it adds ~1~ to the end. If you make more changes and revert again, it adds a ~2~, etc.

xeon