[Merge]Give proper error message for log with non-existent dotted revno

Marius Kruger amanic at gmail.com
Thu Dec 4 20:19:59 GMT 2008


This is a followup patch to "Give proper error message for diff with
non-existent dotted revno", it
* adds a direct test on TestRevisionSpec_revno  (which does check for the
correct exception)
* while I was at it I also added blackbox tests of log -c  and log -r with
non-existing revnos
  because the dotted version of both didn't give the proper error message
before the previous patch.

2008/12/1 John Arbash Meinel <john at arbash-meinel.com>

> This seems like something that should be a direct test on
> RevisionSpec_revno, rather than tested at the 'diff' level. One test
> there is fine, but the detailed tests should be asserting that
> errors.InvalidRevisionSpec is being raised.
>
> I believe "len(revisions) != 1" is because at one point we had a bug in
> our dotted revnos when you had ghosts, which could cause more than one
> revision to have the same revno. This has since been fixed, so doing:
>
>  if not revisions:
> or
>  if revisions == []
> or something like that would be fine as well. Anyway, that was how you
> could have gotten "None" as the revision_id, but still had something
> that was somewhat valid.
>
> So I think the fix is appropriate.
>
> Anyway, I'd like to see the tests cleaned up, but as this is still an
> improvement and it *is* tested I'll go ahead and merge it.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20081204/c6dac475/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nonexisting_dotted_revnos3.patch
Type: text/x-patch
Size: 5028 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081204/c6dac475/attachment.bin 


More information about the bazaar mailing list