[RFC PATCH] Should RevisionSpec_last check for revno < 0 ?

Robert Collins robertc at robertcollins.net
Thu Dec 15 05:38:55 GMT 2005


On Mon, 2005-12-12 at 00:25 -0600, Michael Ellerman wrote:
> Hiya,
> 
> Currently RevisionSpec_last (which implements -r last:x) will happily return
> you a revno which is < 0. Is there any reason why it shouldn't check?
> 
> I'm also not sure if the RevisionSpec classes should be returning
> RevisionInfo(None) when they can't parse a rev spec. I think an exception
> throw would be more appropriate. Hmm.
> 
> Here's the patch I've got for RevisionSpec_last anyway.

I think the intent of last: is that if you say 'last:50' and there are 5
revisions, we only get the last 5, with no error.

I'd rather see that than a negative result -> error.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051215/7578eed6/attachment.pgp 


More information about the bazaar mailing list