Don't forget to handle write errors!

Matt Mackall mpm at selenic.com
Mon Mar 16 13:53:17 CDT 2015


On Sat, 2015-03-14 at 21:50 -0700, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1426392860 25200
> #      Sat Mar 14 21:14:20 2015 -0700
> # Branch stable
> # Node ID 8a60713c37460fc6ad3c310bac68116c49262301
> # Parent  b73a22d1d9bfe3a7f8633340ea75a0ab1526c21b
> tags: create a supplemental cache of .hgtags filenodes (issue4550)

Every single new cache that gets introduced has the same bug:

> +    repo.vfs.append(_fnodescachefile, data)

..failure to silently accept write errors.

There WILL be permission problems and read-only or full filesystems in
the wild, exploding or even complaining because of them is not ok during
a nominally read-only operation.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list