diff -r 813aa8cc55d4 -r 27c4f93d07a9 mercurial/patch.py --- a/mercurial/patch.py Wed Oct 02 07:35:22 2019 +0900 +++ b/mercurial/patch.py Sun Oct 06 13:06:19 2019 +0200 @@ -256,6 +256,11 @@ # should try to parse msg['Date'] parents = [] + nodeid = msg[r'X-Mercurial-Node'] + if nodeid: + data[b'nodeid'] = nodeid = mail.headdecode(nodeid) + ui.debug(b'Node ID: %s\n' % nodeid) + if subject: if subject.startswith(b'[PATCH'): pend = subject.find(b']')