How do I update a working tree to an old revision?
Aaron Bentley
aaron at aaronbentley.com
Fri Jul 17 16:33:05 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Nicholas Allen wrote:
>> I don't understand how commit is relevant.
>>
> I thought that revert was making a change to the working tree that you
> could then commit to revert to a certain revision.
It changes the file contents of working tree to a certain revision.
Whether you choose to commit that is entirely up to you.
> misunderstanding of what revert -r does on my behalf. It sounds like
> what I would expect update -r to do.
The main difference is that update -r changes the tip revision of the
tree and revert does not. This means that if you update -r and run
status or diff, no changes will be shown. It also means that you can't
commit.
> I guess I would use merge command
> to make changes to working tree that revert to an old revision then?
Once you have identified the revision that introduced the bug (I'll call
it $BAD_REVISION), you can "bzr revert" to restore your working tree
files to what they were before you started looking for the bug.
Normally, you would fix the bug, but you can also use "bzr merge . -r
$BAD_REVISION..before:$BAD_REVISION" to remove the changes introduced by
$BAD_REVISION, and commit the result.
Is that what you mean?
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkpgma4ACgkQ0F+nu1YWqI3FIQCbBCAGW5a9lC7FK7vMXOFepFnK
pbYAoIJHjPy9IREb10GRW0+b4V4yZJUw
=8pXZ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list