[PATCH] histedit: delete to drop

Augie Fackler raf at durin42.com
Thu Dec 10 14:08:44 CST 2015


On Thu, Dec 10, 2015 at 10:11:01AM -0800, Durham Goode wrote:
>
>
> On 12/9/15 7:20 PM, timeless wrote:
> >fwiw. I'd prefer a mode where if the user omits lines, we re-present
> >the editor w/ their commands and a set of "drops" at the end of the
> >list for all of the changesets they omitted and ask them to confirm.
> >
> >While it might be a bit annoying to get a second editor, it's a lot
> >clearer and gives people a chance to verify that they did what they
> >intended. Which avoids the footgun.
> >
> I think our emphasis on preventing users from shooting themselves in the
> foot is misplaced.  We should put an emphasis on making undo's easy and
> discoverable. It's like all the dialogs in the old Outlook asking 'are you
> sure you want to delete these emails?', then gmail comes along and just
> offers an 'undo' button and all those annoying dialogs go away.

I don't disagree. That said, I'm seeing _zero_ work on actually making
undo trivial and easily discoverable, and a lot of demand for
footguns, so for the time being, footgun safeties are where I'm
comfortable.

>
> Histedit is a powerful command, and there's an infinite number of ways
> people can shoot themselves, but it would be pretty trivial to print the 'hg
> unbundle .hg/strip-backups/... && hg update <hash>' command the user must
> run to undo the operation. This would allow power users to go about their
> business, and provide a discovery path for understanding how hg backups
> work.

It'd also be a strip operation in addition to those. My main objection
to this is that users NEVER EVER read error output, which means
they'll panic before they realize they can recover. Especially if they
did 'hg log' and then noticed the changes were gone, as now the "undo"
we printed to the screen is off-screen due to scrollback.

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list