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

Martin von Zweigbergk martinvonz at google.com
Thu Nov 13 14:55:09 CST 2014


On Thu Nov 13 2014 at 9:32:41 AM Pierre-Yves David <
pierre-yves.david at ens-lyon.org> wrote:

>
>
> 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.
>

I'll send a new version where I use None instead. That prevents iteration
over the files. Completely preventing access seems harder, but I'm open to
suggestions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20141113/4402f482/attachment.html>


More information about the Mercurial-devel mailing list