[PATCH 1 of 5 mergedriver] mergestate: raise exception if otherctx is accessed but _other isn't set

Martin von Zweigbergk martinvonz at google.com
Mon Nov 30 16:09:41 CST 2015


On Mon, Nov 30, 2015 at 1:13 PM Siddharth Agarwal <sid at less-broken.com>
wrote:

> On 11/30/15 11:34, Martin von Zweigbergk wrote:
> >
> >
> > On Mon, Nov 30, 2015 at 11:29 AM Siddharth Agarwal
> > <sid at less-broken.com <mailto:sid at less-broken.com>> wrote:
> >
> >     On 11/30/15 10:45, Martin von Zweigbergk wrote:
> >     >
> >     >
> >     > On Mon, Nov 30, 2015 at 10:38 AM Siddharth Agarwal <sid0 at fb.com
> >     <mailto:sid0 at fb.com>
> >     > <mailto:sid0 at fb.com <mailto:sid0 at fb.com>>> wrote:
> >     >
> >     >     # HG changeset patch
> >     >     # User Siddharth Agarwal <sid0 at fb.com <mailto:sid0 at fb.com>
> >     <mailto:sid0 at fb.com <mailto:sid0 at fb.com>>>
> >     >     # Date 1448906709 28800
> >     >     #      Mon Nov 30 10:05:09 2015 -0800
> >     >     # Node ID 6ea95357d149d5e1b243bc57abd629962dfea072
> >     >     # Parent  95c37d37acaeb0885a3220939d035649398e81c2
> >     >     # Available At http://42.netv6.net/sid0-wip/hg/
> >     >     #              hg pull http://42.netv6.net/sid0-wip/hg/ -r
> >     >     6ea95357d149
> >     >     mergestate: raise exception if otherctx is accessed but _other
> >     >     isn't set
> >     >
> >     >
> >     > When can that happen?
> >
> >     Not in normal use -- only due to a programming error.
> >
> >
> > Wouldn't we normally use an assertion in such cases?
>
> Python 'assert' statements don't work in optimized mode, so we tend to
> prefer RuntimeErrors instead. But yes, the idea is similar.
>
>
Okay, pushed to the clowncopter!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151130/4b903e54/attachment.html>


More information about the Mercurial-devel mailing list