Mercurial > hg
comparison mercurial/patch.py @ 26552:4caf143313a8
extract: assign user to 'data' earlier
This is used in both case, we can assign it once.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 06 Oct 2015 02:07:33 -0700 |
parents | 5b8faea8b509 |
children | 89b806a09a66 |
comparison
equal
deleted
inserted
replaced
26551:5b8faea8b509 | 26552:4caf143313a8 |
---|---|
260 raise | 260 raise |
261 | 261 |
262 if subject and not message.startswith(subject): | 262 if subject and not message.startswith(subject): |
263 message = '%s\n%s' % (subject, message) | 263 message = '%s\n%s' % (subject, message) |
264 data['message'] = message | 264 data['message'] = message |
265 data['user'] = user | |
265 tmpfp.close() | 266 tmpfp.close() |
266 if not diffs_seen: | 267 if not diffs_seen: |
267 os.unlink(tmpname) | 268 os.unlink(tmpname) |
268 data['user'] = user | |
269 data['date'] = date | 269 data['date'] = date |
270 return data | 270 return data |
271 | 271 |
272 if parents: | 272 if parents: |
273 data['p1'] = parents.pop(0) | 273 data['p1'] = parents.pop(0) |
274 if parents: | 274 if parents: |
275 data['p2'] = parents.pop(0) | 275 data['p2'] = parents.pop(0) |
276 | 276 |
277 data['filename'] = tmpname | 277 data['filename'] = tmpname |
278 data['user'] = user | |
279 data['date'] = date | 278 data['date'] = date |
280 data['nodeid'] = nodeid | 279 data['nodeid'] = nodeid |
281 return data | 280 return data |
282 | 281 |
283 class patchmeta(object): | 282 class patchmeta(object): |