"bzr update -r REVNO" wanted

Robert Widhopf-Fenk hack at robf.de
Sun Jun 25 23:33:00 BST 2006


On Sunday, June 25, 2006 at 10:38:34, Aaron Bentley wrote:
[...]
> I generally use it to go back to old revisions to see how they
> behaved, e.g. whether they exhibited a given bug, and then revert to
> the latest revision before fixing it.  You can also do "revert -r
> -2; commit" as a form of "uncommit" that prevents the changes from
> being reapplied later.

IMHO the docstring of revert should explain when to use -r
and what effect it has.

> > For a moment I thought I could do a "revert -ra..b" to
> > revert all changes from the revisions a to b, but it seems
> > that it is only possible to revert changes from REVNO..HEAD.
> > 
> > To revert a..b I probably have to do
> > 
> >   bzr diff -ra..b | patch -R
> > 
> > which does not handle renames.
> 
> To do this, you can do "bzr merge . -r b..a"

Shouldn't that be noted in the doc string as well?

-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- bzrlib/builtins.py	2006-06-22 18:37:26 +0000
+++ bzrlib/builtins.py	2006-06-25 22:30:50 +0000
@@ -2035,6 +2035,9 @@
     To merge the changes introduced by 82, without previous changes:
     bzr merge -r 81..82 ../bzr.dev
     
+    To revert the changes from revision A to B:
+    bzr merge -r B..A .
+    
     merge refuses to run if there are any uncommitted changes, unless
     --force is given.
 

-------------- next part --------------

> > Nevertheless, it would be nice to have a bzr command to
> > revert some older revisions not starting at head.
> 
> We haven't done any work on commands that make performing
> cherrypicks, easy, because the complementary functionality,
> recording cherrypicks and doing merges when cherrypicks have
> happened, isn't complete.  We don't want to lead people down the
> garden path and have them think bzr will behave intelligently in the
> presence of cherrypicks.  You can do them via "merge .", but it's
> the same effect as though you'd edited the files manually.

Well, merge seems to be sufficient for me ;-)

Thanks,
Robert


More information about the bazaar mailing list