[PATCH] Re: bzr branch -r

Aaron Bentley aaron.bentley at utoronto.ca
Fri Jul 15 04:40:05 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here's an actual, correct fix for bzr branch that
1. accepts --revision and no revision
2. treats None as the LATEST revision, not the first revision
3. correctly handles --revision 0
4. has test cases.

Aaron


Aaron Bentley wrote:
> John A Meinel wrote:
> 
>>>Unfortunately not quite the right fix (because you can now supply stuff
>>>like 'date:yesterday' or 'revid:aoe at utnhauoeu-234234-234234' to the
>>>--revision command.
>>>
>>>The correct fix is:
>>>
>>>if revision is None:
>>>  revision = [None]
>>>else:
>>>  # Check for the right number of revision arguments
>>>  ...
>>>
>>>revno, rev_id = br_to.get_revision_info(revision[0])
>>>if revno == 0:
>>>  revno = None
>>>
>>>This has been fixed in my bzr-split-storage branch, but it might be a
>>>while before that is merged, since it is a pretty big change.
> 
> 
> I was going to say that's wrong-- that since I call lookup_revision
> later on, it doesn't matter whether a number or id:foofa is used.  But
> you're right, because while merge doesn't care, update-revisions wants a
> revision that's in the history of the relevent branch.  We could
> probably support branching from a revision not in the revision-history
> of the branch, but it's a pretty obscure use case, and the results could
> be pretty arbitrary.
> 
> It might be nice to include a unique branch identifier in revisions, so
> that we could reconstruct a revision history from the revisions alone.
> But now that I think of it, there would be a lot of problems
> guaranteeing the uniqueness of the branch id and uncommits would
> probably mess it up too.
> 
> As an aside, it's hella confusing that the partial fix was merged with
> the message "- merge john's plugins-have-test_suite.patch:...".  I
> assumed Martin hadn't fixed it at all, yet.
> 
> Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC1zAV0F+nu1YWqI0RAmuEAJwJcXlxFv2ATH6BXWmcFUYSk6u6ygCbBGvB
Pewx81csxCgMy0ccBqA8iLA=
=AoOF
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixbranch2.patch
Type: text/x-patch
Size: 2175 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050714/990739c6/attachment.bin 


More information about the bazaar mailing list