[PATCH 3 of 5] merge: synthesize L+O records in mergestate for conflictfree merges
simonfar at fb.com
Fri Mar 18 13:39:43 EDT 2016
On 18/03/2016, 10:19, "timeless.bmo1 at gmail.com on behalf of timeless" <timeless.bmo1 at gmail.com on behalf of timeless at gmail.com> wrote:
>Simon Farnsworth <simonfar at fb.com> wrote:
>> Why do we need this? What use is localctx and otherctx if you're not going to attempt a fresh merge (I have some thoughts, but...).
>It provides an easier way for my hg summary patch to calculate the
>answer for what is local/what is other.
>> Would we be better off with (local|other)ctx succeeding rather than throwing an exception if there's no record for the merge point?
>That would also work.
>There are two parents, we know there are two parents. Being forced to
>look in different places is annoying. Having a localctx/otherctx only
>some of the time is nonsensical. Just because there aren't any
>conflicts doesn't mean I shouldn't be able to look at them...
My gut feeling is that otherctx and localctx should always succeed using the information we have in memory if there's no mergestate, rather than synthesising records; I dislike synthetic records because of the risk of confusion between records we've synthesised, and records from disk. I'm willing to accept it when we're reading an old format file, and synthesising new format records, but otherwise it makes me feel bad.
More information about the Mercurial-devel