[PATCH] rollback: clarifies the message about the reverted state (issue 2628)

Gilles Moris gilles.moris at free.fr
Thu Feb 17 02:24:48 CST 2011


On Thursday 10 February 2011 09:05:22 am Gilles Moris wrote:
> # HG changeset patch
> # User Gilles Moris <gilles.moris at free.fr>
> # Date 1297324986 -3600
> # Node ID 9705430d311af358bce56bd92293d0705b6bf7f6
> # Parent  69e69b131458023d21ec40aa48fc5299e43ce69b
> rollback: clarifies the message about the reverted state (issue 2628)
>
> Previously, when rolling back a transaction, some users could be confused
> between the level to which the database is rolled back, and the new parents
> of the working directory.
>
>   $ hg rollback
>   rolling back to revision 4 (undo commit)
>
> With this change:
>   $ hg rollback
>   rolling back database to tip revision 4 (undo commit)
>   your working directory is now based on revision 2 and 1
>
> So now the user can realize that the database has been rolled back to an
> older tip, but also that the working directory is not on the tip (here we
> are rolling back the merge of the heads 2 and 1)

What do we do for this one ? The rollback command is one of the almost only 
command flagged as dangerous in the core, so I think we owe some clarity to 
our users.
Is this any better:
$ hg rollback
rolling back store to tip revision 4 (undo commit)
your working directory is now based on revision 2 and 1

Can someone come up with a better message or do we close this issue2628 as no 
fix ?

Regards.
Gilles.


More information about the Mercurial-devel mailing list