amend: remove revnum from UX

Summary: Change fold and metaedit to not show revnum in editor message.

Reviewed By: kulshrax

Differential Revision: D24191787

fbshipit-source-id: 140ec58c8eb00c067c6e40e1a18187f7801246e9
This commit is contained in:
Jun Wu 2020-10-08 13:18:45 -07:00 committed by Facebook GitHub Bot
parent e5cc62130d
commit 83c996cf95
3 changed files with 6 additions and 6 deletions

View File

@ -131,8 +131,8 @@ def fold(ui, repo, *revs, **opts):
else:
msgs = ["HG: This is a fold of %d changesets." % len(allctx)]
msgs += [
"HG: Commit message of changeset %s.\n\n%s\n"
% (c.rev(), c.description())
"HG: Commit message of %s.\n\n%s\n"
% (node.short(c.node()), c.description())
for c in allctx
]
commitopts["message"] = "\n".join(msgs)

View File

@ -181,8 +181,8 @@ def metaedit(ui, repo, templ, *revs, **opts):
if opts["fold"]:
msgs = [_("HG: This is a fold of %d changesets.") % len(allctx)]
msgs += [
_("HG: Commit message of changeset %s.\n\n%s\n")
% (c.rev(), c.description())
_("HG: Commit message of %s.\n\n%s\n")
% (nodemod.short(c.node()), c.description())
for c in allctx
]
else:

View File

@ -122,11 +122,11 @@ Test
$ HGEDITOR=cat hg metaedit '.^::.' --fold
HG: This is a fold of 2 changesets.
HG: Commit message of changeset 6.
HG: Commit message of c2bd843aa246.
E
HG: Commit message of changeset 8.
HG: Commit message of 212b2a2b87cd.
F