hg strip

Norman Gray gray at nxg.name
Wed Oct 5 10:31:45 UTC 2022


Greetings

On 5 Oct 2022, at 7:22, David Demelier wrote:

> I guess this has to do with the fact that Mercurial team wants to push
>  evolve and all other "safe-history" editing commands rather than
>  history-rewriting ones like strip, histedit and others.
>
>  Other than that, I don't think strip should be deprecated. Users have
>  the power and as long as you know what you're doing that's fine. I
>  don't want Mercurial to be an opinionated SCM.

I wouldn't claim to be an expert, and I doubt these deprecations are up for discussion, but I would agree with David here -- in my mental picture of Mercurial, strip and rollback have useful roles as repository-management, as opposed to history-management, operations.

That is, they seem to me to operate on a different (mental) layer from histedit, evolve, and friends.  The latter are for changes in the code that I want to preserve and manage; strip is for surgery to the local repository for some administrative reason that I want to result in invisible or seamless changes (the standard use-case is definitively removing a checked in password).  That means, of course, that they are really local-only commands, rarely useful with a repository which is shared.

Strip and rollback also have the advantage that they are very intelligible, and easy to reason about.  The evolve extension is clever, but consequently rather magical, which means I use it with more nervousness than strip.  Rollback rolls back one fumbled transaction, pure and simple: finger trouble?, committed in the wrong window? I don't want to evolve that away (though I'm sure I could, with thought), I just want 'undo'.

As it happens, just yesterday I was talking (amiably!) with a colleague about Mercurial's model vs git's one, and I cited rollback as an example of Mercurial's intelligibility-by-design, and its orthogonality, in contrast to the blizzard of strange things you can do with git's staging area (asking for help with which was what started the conversation).  I use rollback very rarely, but it's important in my picture of Mercurial's conceptual strengths.

Best wishes,

Norman


-- 
Norman Gray  :  https://nxg.me.uk


More information about the Mercurial mailing list