Mercurial prefixes every line of its editor template with HG: and
spells the change types out as added, changed and removed rather
than using jj's single letter codes, so none of the old token set
carried over.
A change type can no longer be told apart from free form comment text by
a single character of lookahead, so the types are given a higher lexical
precedence than the comment text token instead, and the comment text
token is kept from starting on whitespace so that the separator after
HG: stays unambiguous.
Scissors come back as mercurial's HG: ------ >8 ------ marker, which
mercurial/cmdutil.py strips along with everything below it, and which
the committemplate recipe in hg help config uses to show the diff of
the change. The HG: lines mercurial puts between the marker and the
diff stay comments so that only the diff itself is injected.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com