[PATCH 1 of 4] context.status: wipe deleted/unknown/ignored fields when reversed

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Nov 13 11:32:29 CST 2014



On 11/13/2014 06:29 AM, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com>
> # Date 1415855947 28800
> #      Wed Nov 12 21:19:07 2014 -0800
> # Node ID 4efe64f7b1b244f9224a0706bb98f358e24e3dd3
> # Parent  3480c07fc934a9c90c8dda1ed2bc98fd9c96c44a
> context.status: wipe deleted/unknown/ignored fields when reversed
>
> It makes no sense to request reverse status (i.e. changes from the
> working copy to its parent) and then look at the deleted, unknown or
> ignored fields. If you do, you would get the result from the forward
> status (changes from parent to the working copy). Instead of giving a
> nonsensical answer to a nonsensical question, it seems a little saner
> to return empty lists.


> It might be best if we could prevent the caller
> accessing these lists, but it's doubtful it's worth the trouble.

I think it worth the trouble and would sleep better at night if we did.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list