[PATCH] backout: provide linear backout as a default (without --merge option)

Gilles Moris gilles.moris at free.fr
Mon Oct 11 15:40:06 CDT 2010


On Monday 11 October 2010 07:41:50 am timeless wrote:
> On Tue, Sep 21, 2010 at 2:53 PM, Gilles Moris <gilles.moris at free.fr> wrote:
> > # HG changeset patch
> > # User Gilles Moris <gilles.moris at free.fr>
> > # Date 1284107298 -7200
> > # Node ID 478385c46665cdc7192e0f876a2e8b2bc957f2fc
> > # Parent  17feeef6da9ed761c416d3b054dc7cc0247e6269
> > backout: provide linear backout as a default (without --merge option)
> >

Thanks for this native english speaker review.

> > This change enables to have a backout changeset that will keep the
>
> This changes backout changeset to retain linear history,
>
> > history linear, i.e. committed as a child of the working directory
> > parent.
>
> i.e. it is committed as a child of the working directory parent, not
> the backed out changeset parent.

Fixed.

>
> > The default behavior was previously to just commit a reverted change as a
>
> -- you use behavior (en-US) here.
>
> > child of the backed out changeset and thus creating a new head.
>
> changeset - thus creating a new head.
>

Fixed.

> > Most of
> > the time, you would use the --merge option, as it does not make sense to
> > keep this dangling head as is.
> >
> > The previous behavior can be restored using 'hg update --clean .' after a
>
> The previous behavior can be obtained by using ...

Fixed.

>
> > 'hg backout --merge'.
>
> ------ Does this actually work?

Yes, it just revert the ongoing merge that "backout --merge" initiate.
You can already test it without the patch applied.

>
> > The --merge option itself is not affected by this change. There is also
> > still an autocommit of the backout if a merge is not needed, i.e. in case
> > of the backout of the parent of the working directory.
>
> ... in case the backoutis of the working directory parent.
>

You mean:
"... in case the backout is the working directory parent."
Right ?

> > So previously we had (pwd = parent of the working directory):
>
> Previously we had....
>

OK

> >                  pwd     older
> > backout           auto    merge
> > backout --merge   auto    commit
> >
> > With the new linear approach:
> >                  pwd     older
> > backout           auto    commit
> > backout --merge   auto    commit
> >
> > auto: commit done by the backout command
> > merge: backout also already committed but explicit merge and commit
> > needed commit: user need to commit the update/merge
> >
> > +    The backout command merges the reverse effect of the backed out
> > +    changeset into the working directory.
> > +
> > +    With the --merge option, it first commit the backed out changes
>
> ... it first commits ...
>

Of course.

> > +    as a new changeset. This new changeset is a child of the backed
> > +    out changeset.
>
> -- Personally i'm not a fan of "backed out" and would prefer
> "reverted" (global comment).

OK, I was not too sure about that: changed to reverted.

>
> >     The --merge option remembers the parent of the working directory
> >     before starting the backout, then merges the new head with that
> > +    changeset afterwards.
> > +    This will result in an explicit merge in the history log.
>
> -- I'm not sure "history log" is how we'd right this.
>

"history graph" ?

> > +    If you backout a changeset other than the original parent of the
> > +    working directory, the result of this merge is not committed,
> > +    as with a normal merge. Otherwise, no merge is needed and the
> > +    commit is automatic.
> > +
> > +    Note that the default behavior (without --merge) has changed in
> > +    version 1.7. To restore the previous default behaviour, use
>
> -- you use behaviour (en-GB) here. Do not use both. I believe
> mercurial is supposed to be en-US.

Yes, I have the same problem with color/colour.
I have picked up "behavior".

Thanks.
Gilles.


More information about the Mercurial-devel mailing list