Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 26547:b9be8ab6e628
patch: move 'extract' return to a dictionnary
The final goal here is to be able to parse, return and process arbitrary data
from patch. This mirror the recently added ability to add arbitrary data to
patch headers.
The first step is to return something more flexible, so we return a dict without
changing any other logic.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 06 Oct 2015 02:01:53 -0700 |
parents | e99c3846d78a |
children | 1f14920a892c |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Oct 06 01:49:04 2015 -0700 +++ b/mercurial/cmdutil.py Tue Oct 06 02:01:53 2015 -0700 @@ -850,8 +850,15 @@ """ # avoid cycle context -> subrepo -> cmdutil import context - tmpname, message, user, date, branch, nodeid, p1, p2 = \ - patch.extract(ui, hunk) + extractdata = patch.extract(ui, hunk) + tmpname = extractdata.get('filename') + message = extractdata.get('message') + user = extractdata.get('user') + date = extractdata.get('date') + branch = extractdata.get('branch') + nodeid = extractdata.get('nodeid') + p1 = extractdata.get('p1') + p2 = extractdata.get('p2') update = not opts.get('bypass') strip = opts["strip"]