[PATCH 5 of 6 stable] hgweb: avoid traceback when comparing a non-existent file

Patrick Mézard patrick at mezard.eu
Mon Jul 30 06:30:25 CDT 2012


Le 30/07/12 12:09, Ross Lagerwall a écrit :
> # HG changeset patch
> # User Ross Lagerwall <rosslagerwall at gmail.com>
> # Date 1343640628 -7200
> # Branch stable
> # Node ID 4f3e4d48d3353c55d532425df1e75a7f40d31b23
> # Parent  77f6a12199aeb8ac3c66de13184bc819b80f3a35
> hgweb: avoid traceback when comparing a non-existent file
> 
> Previously, comparison would use a generator to generate the data which
> would only be evaluated when writing the response to the client. If a
> non-existent file was given (http://server/comparison/tip/unknown), it
> would throw a LookupError too late causing the traceback. So, fix it
> by removing the generator.

Excellent, thank you. I pushed all the patches but this one to crew-stable, after updating the tests:

  http://hg.intevation.org/mercurial/crew/rev/7a9246abf9fe

About this patch, I have not looked at the code yet but is there no way to make it fail earlier without removing the generator? Does the diff page have the same problem? What are the (performance?) implications of removing the generator?

--
Patrick Mézard
  



More information about the Mercurial-devel mailing list