This is a followup patch to "Give proper error message for diff with non-existent dotted revno", it<br>* adds a direct test on TestRevisionSpec_revno (which does check for the correct exception)<br>* while I was at it I also added blackbox tests of log -c and log -r with non-existing revnos<br>
because the dotted version of both didn't give the proper error message before the previous patch.<br><br><div class="gmail_quote">2008/12/1 John Arbash Meinel <span dir="ltr"><<a href="mailto:john@arbash-meinel.com">john@arbash-meinel.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">This seems like something that should be a direct test on<br>
RevisionSpec_revno, rather than tested at the 'diff' level. One test<br>
there is fine, but the detailed tests should be asserting that<br>
errors.InvalidRevisionSpec is being raised.<br>
<br>
I believe "len(revisions) != 1" is because at one point we had a bug in<br>
our dotted revnos when you had ghosts, which could cause more than one<br>
revision to have the same revno. This has since been fixed, so doing:<br>
<br>
if not revisions:<br>
or<br>
if revisions == []<br>
or something like that would be fine as well. Anyway, that was how you<br>
could have gotten "None" as the revision_id, but still had something<br>
that was somewhat valid.<br>
<br>
So I think the fix is appropriate.<br>
<br>
Anyway, I'd like to see the tests cleaned up, but as this is still an<br>
improvement and it *is* tested I'll go ahead and merge it.<br>
</blockquote></div><br>