On 09/02/2011 11:49 AM, Данило Шеган wrote:
> The proposal to merge lp:~danilo/loggerhead/bug-839395 into lp:loggerhead has been updated.
>
> Description changed to:
>
> = Bug 839395 =
>
> Make sure hacking a URL to go to a per-revision log for a certain file that is not part of that revision change causes no OOPS.
>
> I am sure the test could be better, but it at least fails where expected, and with the fix it starts passing.
>
> Also, maybe it'd be better to throw a 404 when the path is not matched, so any suggestions on how do we do that (and write a test for it) are welcome.
>
> For more details, see:
> https://code.launchpad.net/~danilo/loggerhead/bug-839395/+merge/73766
You can raise an HTTPException from the paste family to get the web ui
to give a 404.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 09/02/2011 11:49 AM, Данило Шеган wrote: /code.launchpad .net/~danilo/ loggerhead/ bug-839395/ +merge/ 73766
> The proposal to merge lp:~danilo/loggerhead/bug-839395 into lp:loggerhead has been updated.
>
> Description changed to:
>
> = Bug 839395 =
>
> Make sure hacking a URL to go to a per-revision log for a certain file that is not part of that revision change causes no OOPS.
>
> I am sure the test could be better, but it at least fails where expected, and with the fix it starts passing.
>
> Also, maybe it'd be better to throw a 404 when the path is not matched, so any suggestions on how do we do that (and write a test for it) are welcome.
>
> For more details, see:
> https:/
You can raise an HTTPException from the paste family to get the web ui
to give a 404.
See "inventory_ui.py" line 113:
try:
rev_ tree = branch. repository. revision_ tree(revid) NoSuchRevision:
revid = self.get_revid()
except errors.
raise HTTPNotFound()
So probably you could do:
if len(items) == 0:
raise HTTPNotFound()
...
If you want to do it, great. If not, we can still merge what you've done.
merge:approve
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk5 gqR4ACgkQJdeBCY SNAAPv3ACdHiO8t LNMw143aVotg93o Yglz fNtFpI0bwwPWR34 Lh
qAEAoLpXbMtSAe7
=eXdO
-----END PGP SIGNATURE-----