[PATCH] fix revision handling in bzr branch
John A Meinel
john at arbash-meinel.com
Mon Jul 11 23:47:40 BST 2005
Aaron Bentley wrote:
> Apparently, bzr branch is suffering from the same malady as bzr
> merge-revert. Here's a patch.
>
> Aaron
Actually, it is quite a bit more serious that just this. I was
accidentally using the wrong branch for looking up the revision, and I
was looking up the revision_id rather than looking up the revision number.
I've fixed it on my bzr-split-store tree, but I don't know that I have a
specific patch for it.
Your fix is necessary to make it run without --revision, but you need
more to get it to work *with* --revision.
While I was at it, I added --revision to bzr pull.
My fix was basically to do:
if revision is None:
revision = [None]
else:
if len(revision) > 1:
raise BzrCommandError('bzr pull --revision takes exactly 1
revision value')
...
revno, rev_id = br_from.get_revision_info(revision[0])
Instead of:
revno = br_to.lookup_revision(revision[0])
(lookup_revision returns the revision_id, we want the revno for
stop_revision to work)
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050711/c3efc618/attachment.pgp
More information about the bazaar
mailing list