[PATCH 0 of 2 STABLE] Strengthening of commit --amend command

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Jul 31 13:17:08 CDT 2012


On 31 juil. 2012, at 09:24, Idan Kamara wrote:

> On Tue, Jul 31, 2012 at 2:16 AM, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
> >
> > Some time ago, a user reported the lack of resilience of --amend to
> > interruption.
> >
> > Today I witnessed the effect of a crashed --amend on a poor insuspecting
> > user.
> >
> > Solutions seems pretty simple and are applied in this series
> 
> I can't test this yet but what is the end result of this?
> 
> Amend has two phases (sometimes):
> 
> 1) prepare an intermediate commit with the changes in the wd
> 2) fold it with the parent cset and apply it
> 
> So if the user interrupts between 1 and 2, the repository is restored
> to the how it looked prior to 1?

Yes. Any failure until (2) is finalized will restore the repository to the state it was before the command were invoqued.

-- 
Pierre-Yves


More information about the Mercurial-devel mailing list