changeset 26560:75d448d56a9d

extract: parse 'nodeid' using the generic mechanism Parsing 'nodeid' is very simple and a good first test.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 06 Oct 2015 02:23:21 -0700
parents dbd4392daedf
children 1f14920a892c
files mercurial/patch.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/patch.py	Tue Oct 06 02:22:23 2015 -0700
+++ b/mercurial/patch.py	Tue Oct 06 02:23:21 2015 -0700
@@ -155,6 +155,7 @@
 # list of pairs ("header to match", "data key")
 patchheadermap = [('Date', 'date'),
                   ('Branch', 'branch'),
+                  ('Node ID', 'nodeid'),
                  ]
 
 def extract(ui, fileobj):
@@ -236,8 +237,6 @@
                         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("# "):