# HG changeset patch # User Pierre-Yves David # Date 2015-10-06 09:23:21 # Node ID 75d448d56a9de06187c75b6b65ce3384f5abda94 # Parent dbd4392daedf542efd2419270b8374eb01eb06eb extract: parse 'nodeid' using the generic mechanism Parsing 'nodeid' is very simple and a good first test. diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -155,6 +155,7 @@ def split(stream): # list of pairs ("header to match", "data key") patchheadermap = [('Date', 'date'), ('Branch', 'branch'), + ('Node ID', 'nodeid'), ] def extract(ui, fileobj): @@ -236,8 +237,6 @@ def extract(ui, fileobj): if line.startswith('# User '): data['user'] = line[7:] ui.debug('From: %s\n' % data['user']) - elif line.startswith("# Node ID "): - data['nodeid'] = line[10:] elif line.startswith("# Parent "): parents.append(line[9:].lstrip()) elif line.startswith("# "):