[PATCH 5 of 6 v2] bookmarks: make _readactive safe when readlines raises ENOENT

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Dec 2 12:56:11 CST 2015



On 12/02/2015 08:58 AM, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie at google.com>
> # Date 1448993285 18000
> #      Tue Dec 01 13:08:05 2015 -0500
> # Node ID 6f3aa7041edf0ab6a4c891ebbf566b4c94523847
> # Parent  4600ce9ad6ec0bd96c34d28b7c61ebe4926f5c2e
> bookmarks: make _readactive safe when readlines raises ENOENT
>
> When reading over static http, the file isn't actually opened until
> the readlines() call, so we have to check for ENOENT IOErrors here
> too. This is necessary so that we can use the bmstore everywhere for
> managing the active bookmark, which will be true in the next change.

Urg, I'm pretty sure this is breaking other stuff.
Can you at least document the reason on this hack inline?
(should we fix this at the httprepo level?)

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list