Page MenuHomePhabricator

templates: fix `revset('parents()') % ...` in amend message template
ClosedPublic

Authored by martinvonz on May 11 2021, 3:26 PM.

Details

Summary

I don't understand why, but putting revset('parents()') % {desc} in
the commit message template for amend resulted in a crash because
memctx.hex() did hex(self.node()) and its node was None. This
patch fixes that.

Martin von Zweigbergk <martinvonz@google.com>

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

martinvonz created this revision.May 11 2021, 3:26 PM
joerg.sonnenberger requested changes to this revision.May 11 2021, 3:41 PM
joerg.sonnenberger added inline comments.
mercurial/context.py
1396

Use the hex constant please.

This revision now requires changes to proceed.May 11 2021, 3:41 PM
martinvonz updated this revision to Diff 27908.May 11 2021, 3:42 PM
martinvonz marked an inline comment as done.May 11 2021, 3:43 PM
pulkit accepted this revision.May 15 2021, 3:24 PM
This revision is now accepted and ready to land.May 15 2021, 3:24 PM