Rollback ate my commit message! (issue 1635)

Martin Geisler mg at lazybytes.net
Wed Nov 18 15:15:33 CST 2009


Douglas Philips <dgou at mac.com> writes:

> On or about 2009 Nov 18, at 1:48 PM, Martin Geisler indited:
>
>> I've always seen rollback as a low-level command that just happens to
>> be useful for quickly redoing a commit. It's low-level since it's so
>> limited: there's no indication of what will happen and there's only
>> one rollback point.
>
> I've always seen rollback as having bugs:
> 	It knows, but won't tell you, where it will rollback to.

As far as I know, rollback only knows some file lengths. It truncates
the files back to the last good length -- Mercurial is append-only, so
this effectively undoes the last operation.

I'm not sure why we only save the very last lengths?

> 	Rollback info is strictly hierarchical, so there is no reason
> (theoretically), that it couldn't nest. Strip tends to take up the
> slack here instead.

The revisions are written out in the revlogs by their revision number
(or rather, revisions get their revision number from their order in the
revlogs). So that is why strip needs to do extra work if you have
revisions from different branches interleaved on disk. It cannot just go
in and truncate a file if there is a changeset from another branch in
the middle of the truncated piece.

>> A proper command that is meant to be used regularly should not have
>> such a simple interface. I would almost say that rollback should have
>> been a debug command.
>
> So we'll have an 'unpull' command and ... Rollback fits with the unix
> philosophy. With a verbose and dry-run options it would quite useful,
> IMHO, as it fits with the *nix philosophy of having simple
> compose-able parts.

Yeah, I do agree that it's extremely useful -- that's why we're all
using it despite it's flaws :-)

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20091118/638d6fc2/attachment.pgp>


More information about the Mercurial-devel mailing list