Page MenuHomePhabricator

histedit: tweak `edit` message to try and guide users to our workflow
ClosedPublic

Authored by durin42 on Dec 10 2020, 11:47 AM.

Details

Summary

histedit predates evolve, so it drops you on an _uncommitted_ version
of the commit you're amending/splitting, which is in contrast to git
which expects you to use git commit --amend (I think - I'm basing
this on internal bug reports). My hope is that this output will guide
users a little more towards the expected workflow.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durin42 created this revision.Dec 10 2020, 11:47 AM
martinvonz requested changes to this revision.Dec 10 2020, 12:07 PM
martinvonz added a subscriber: martinvonz.
martinvonz added inline comments.
hgext/histedit.py
37

This line (same on line 60) sounds at least as confusing. How about "use commit, but edit before committing" or something like that?

This revision now requires changes to proceed.Dec 10 2020, 12:07 PM
durin42 marked an inline comment as done.Dec 10 2020, 1:15 PM

Sent D9561 to discuss the wording change there. PTAL?

martinvonz added inline comments.Dec 10 2020, 1:31 PM
hgext/histedit.py
802

What does "amend" mean here? Amend into the parent commit? Or amend relative to the original commit? I think it's the latter, but it sounds like the former to me. Maybe simply s/amend/rewrite/ would make it clearer?

durin42 updated this revision to Diff 24174.Dec 10 2020, 1:42 PM
durin42 marked an inline comment as done.Dec 10 2020, 1:43 PM
durin42 added inline comments.
hgext/histedit.py
802

I went with edit because characters are pretty precious at this point. If that's not clear enough (I honestly can't tell), please feel encouraged to suggest alternatives that can keep this line in its 80col limit.

martinvonz accepted this revision.Dec 10 2020, 1:45 PM
martinvonz added inline comments.
hgext/histedit.py
802

That seems good enough. My problem with "amend" is that hg amend is about squashing the working copy changes into the working copy parent, which I don't think is what we're doing here.

This revision is now accepted and ready to land.Dec 10 2020, 1:45 PM
durin42 marked an inline comment as done.Dec 10 2020, 1:57 PM
This revision was automatically updated to reflect the committed changes.