Mercurial > hg
changeset 26559:dbd4392daedf
extract: parse 'branch' using the generic mechanism
Parsing 'branch' is very simple and a good first test.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 06 Oct 2015 02:22:23 -0700 |
parents | fe52cd049f01 |
children | 75d448d56a9d |
files | mercurial/patch.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Wed Oct 07 01:13:36 2015 -0700 +++ b/mercurial/patch.py Tue Oct 06 02:22:23 2015 -0700 @@ -153,7 +153,9 @@ ## Some facility for extensible patch parsing: # list of pairs ("header to match", "data key") -patchheadermap = [('Date', 'date')] +patchheadermap = [('Date', 'date'), + ('Branch', 'branch'), + ] def extract(ui, fileobj): '''extract patch from data read from fileobj. @@ -234,8 +236,6 @@ if line.startswith('# User '): data['user'] = line[7:] ui.debug('From: %s\n' % data['user']) - elif line.startswith("# Branch "): - data['branch'] = line[9:] elif line.startswith("# Node ID "): data['nodeid'] = line[10:] elif line.startswith("# Parent "):