Show More
@@ -1289,6 +1289,21 b' def diff(ui, repo, *files, **opts):' | |||||
1289 | repo.mq.diff(repo, list(files)) |
|
1289 | repo.mq.diff(repo, list(files)) | |
1290 | return 0 |
|
1290 | return 0 | |
1291 |
|
1291 | |||
|
1292 | def header(ui, repo, patch=None): | |||
|
1293 | """Print the header of the topmost or specified patch""" | |||
|
1294 | q = repo.mq | |||
|
1295 | ||||
|
1296 | if patch: | |||
|
1297 | patch = q.lookup(patch) | |||
|
1298 | else: | |||
|
1299 | if not q.applied: | |||
|
1300 | ui.write('No patches applied\n') | |||
|
1301 | return | |||
|
1302 | patch = q.lookup('qtip') | |||
|
1303 | message = repo.mq.readheaders(patch)[0] | |||
|
1304 | ||||
|
1305 | ui.write('\n'.join(message) + '\n') | |||
|
1306 | ||||
1292 | def lastsavename(path): |
|
1307 | def lastsavename(path): | |
1293 | (dir, base) = os.path.split(path) |
|
1308 | (dir, base) = os.path.split(path) | |
1294 | names = os.listdir(dir) |
|
1309 | names = os.listdir(dir) | |
@@ -1447,6 +1462,8 b' cmdtable = {' | |||||
1447 | 'hg qcommit [OPTION]... [FILE]...'), |
|
1462 | 'hg qcommit [OPTION]... [FILE]...'), | |
1448 | "^qdiff": (diff, [], 'hg qdiff [FILE]...'), |
|
1463 | "^qdiff": (diff, [], 'hg qdiff [FILE]...'), | |
1449 | "qdelete": (delete, [], 'hg qdelete PATCH'), |
|
1464 | "qdelete": (delete, [], 'hg qdelete PATCH'), | |
|
1465 | 'qheader': (header, [], | |||
|
1466 | _('hg qheader [PATCH]')), | |||
1450 | "^qimport": |
|
1467 | "^qimport": | |
1451 | (qimport, |
|
1468 | (qimport, | |
1452 | [('e', 'existing', None, 'import file in patch dir'), |
|
1469 | [('e', 'existing', None, 'import file in patch dir'), |
@@ -29,6 +29,7 b' list of commands (use "hg help -v mq" to' | |||||
29 | qcommit commit changes in the queue repository |
|
29 | qcommit commit changes in the queue repository | |
30 | qdelete remove a patch from the series file |
|
30 | qdelete remove a patch from the series file | |
31 | qdiff diff of the current patch |
|
31 | qdiff diff of the current patch | |
|
32 | qheader Print the header of the topmost or specified patch | |||
32 | qimport import a patch |
|
33 | qimport import a patch | |
33 | qinit init a new queue repository |
|
34 | qinit init a new queue repository | |
34 | qnew create a new patch |
|
35 | qnew create a new patch |
General Comments 0
You need to be logged in to leave comments.
Login now