[PATCH 2 of 3] histedit: make finishfold not depend on parentctx
Durham Goode
durham at fb.com
Tue Feb 10 23:09:51 CST 2015
On 2/10/15 10:32 AM, Augie Fackler wrote:
> On Thu, Feb 05, 2015 at 01:59:15PM -0800, Mateusz Kwapich wrote:
>> # HG changeset patch
>> # User Mateusz Kwapich <mitrandir at fb.com>
>> # Date 1423170607 28800
>> # Thu Feb 05 13:10:07 2015 -0800
>> # Node ID 9ea70194adf7d075f31044c082f70f7c436a392a
>> # Parent d68972b5e29e920571d976fee41a385d4f6baa95
>> histedit: make finishfold not depend on parentctx
>>
>> To make histedit more robust to changes between actions, let's make finishfold
>> not depend on having access to the original parentctx. This has the slight side
>> effect of not merging the commit dates or phases anymore. Instead we just keep
>> the date and phase of the original commit, which arguably the right choice in
>> the beginning since the user is choosing to get rid of the second commit.
> No, the user is folding the two commits together.
>
> Can we do this without dropping the merging of date and phase?
>
Removing the dependency on the parentctx without dropping that state
would require storing that data in the histedit state, which requires a
format change. Personally I don't think the date and phase are
important here. We're making an arbitrary choice already, so some other
arbitrary choice is about as good as the first.
However, now that we're preventing strips in the middle of the histedit,
patches 2 and 3 here become less important (since the parentctx should
always be valid). The initial goal was to prevent hg histedit --abort
from crashing, and we can do that gracefully now that patch 1 is in,
without completely breaking the dependency on parentctx.
More information about the Mercurial-devel
mailing list