Reputation: 53
I'm a single user looking into Bazaar Explorer gui. Consider this scenario:
Create repository.
Create FileOne and add.
Commit as rev 1.
Make changes to FileOne.
Commit as rev 2.
Create and add FileTwo.
Commit as rev 3.
Now, let's say that FileOne has problems and I want to revert to rev 1. If I do this FileTwo will be deleted. If I want to keep FileTwo I guess I can copy it somewhere outside of version control, revert to rev 1, and then add FileTwo back to version control. This seems clumsy to me. Is there a better way of doing this? Thanks..
Upvotes: 2
Views: 43
Reputation: 8730
You can do one of the following:
First, selectively revert FileOne
, e.g.:
bzr revert -r 1 FileOne
bzr commit
This will restore FileOne
to the way it was in revision 1.
Second, use reverse cherrypicking:
bzr merge -r 2..1
bzr commit
This will create a patch that inverts the change of going from revision 1 -> 2.
Either option will create a new commit, but with the changes made in revision 2 undone.
Upvotes: 1