[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.
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]
if len(revision) > 1:
raise BzrCommandError('bzr pull --revision takes exactly 1
revno, rev_id = br_from.get_revision_info(revision)
revno = br_to.lookup_revision(revision)
(lookup_revision returns the revision_id, we want the revno for
stop_revision to work)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050711/c3efc618/attachment.pgp
More information about the bazaar