[PATCH] mq: gracefully handle malformated status file

Mads Kiilerich mads at kiilerich.com
Mon Feb 28 05:01:41 CST 2011


On 02/28/2011 11:51 AM, Pierre-Yves David wrote:
> I'm resending this small patch making mq more robust.
>
> # HG changeset patch
> # User Pierre-Yves David<pierre-yves.david at logilab.fr>
> # Date 1297426239 -3600
> # Branch stable
> # Node ID 13ce20da49086647b98883aa0c239f85242bbe05
> # Parent  02aa06a021a066cb360dc71097dedfa3ef123bb2
> mq: gracefully handle malformated status file.
>
> This patch prevent mq to crash when .hg/patches/status contains Malformed lines
> (without ":"). Blank lines are ignored and other malformed lines issue a
> warning.

The status file is maintained by mq and should never be edited manually. 
Why do we have to be more robust here?

Ok, Mercurial should IMHO never give crash, no matter how invalid its 
input is. But I think a clean abort would be better than flexibility.

/Mads


More information about the Mercurial-devel mailing list