Show More
@@ -301,8 +301,10 b' class queue:' | |||
|
301 | 301 | return (message, comments, user, date, diffstart > 1) |
|
302 | 302 | |
|
303 | 303 | def printdiff(self, repo, node1, node2=None, files=None, |
|
304 |
fp=None, changes=None, opts= |
|
|
305 | patch.diff(repo, node1, node2, files, | |
|
304 | fp=None, changes=None, opts={}): | |
|
305 | fns, matchfn, anypats = cmdutil.matchpats(repo, files, opts) | |
|
306 | ||
|
307 | patch.diff(repo, node1, node2, fns, match=matchfn, | |
|
306 | 308 | fp=fp, changes=changes, opts=self.diffopts()) |
|
307 | 309 | |
|
308 | 310 | def mergeone(self, repo, mergeq, head, patch, rev, wlock): |
@@ -902,13 +904,13 b' class queue:' | |||
|
902 | 904 | else: |
|
903 | 905 | self.ui.write("Patch queue now empty\n") |
|
904 | 906 | |
|
905 |
def diff(self, repo, |
|
|
907 | def diff(self, repo, pats, opts): | |
|
906 | 908 | top = self.check_toppatch(repo) |
|
907 | 909 | if not top: |
|
908 | 910 | self.ui.write("No patches applied\n") |
|
909 | 911 | return |
|
910 | 912 | qp = self.qparents(repo, top) |
|
911 |
self.printdiff(repo, qp, files= |
|
|
913 | self.printdiff(repo, qp, files=pats, opts=opts) | |
|
912 | 914 | |
|
913 | 915 | def refresh(self, repo, msg='', short=False): |
|
914 | 916 | if len(self.applied) == 0: |
@@ -1435,10 +1437,9 b' def refresh(ui, repo, **opts):' | |||
|
1435 | 1437 | q.save_dirty() |
|
1436 | 1438 | return 0 |
|
1437 | 1439 | |
|
1438 |
def diff(ui, repo, * |
|
|
1440 | def diff(ui, repo, *pats, **opts): | |
|
1439 | 1441 | """diff of the current patch""" |
|
1440 | # deep in the dirstate code, the walkhelper method wants a list, not a tuple | |
|
1441 | repo.mq.diff(repo, list(files)) | |
|
1442 | repo.mq.diff(repo, pats, opts) | |
|
1442 | 1443 | return 0 |
|
1443 | 1444 | |
|
1444 | 1445 | def fold(ui, repo, *files, **opts): |
@@ -1884,7 +1885,10 b' cmdtable = {' | |||
|
1884 | 1885 | (commit, |
|
1885 | 1886 | commands.table["^commit|ci"][1], |
|
1886 | 1887 | 'hg qcommit [OPTION]... [FILE]...'), |
|
1887 | "^qdiff": (diff, [], 'hg qdiff [FILE]...'), | |
|
1888 | "^qdiff": (diff, | |
|
1889 | [('I', 'include', [], _('include names matching the given patterns')), | |
|
1890 | ('X', 'exclude', [], _('exclude names matching the given patterns'))], | |
|
1891 | 'hg qdiff [-I] [-X] [FILE]...'), | |
|
1888 | 1892 | "qdelete|qremove|qrm": |
|
1889 | 1893 | (delete, |
|
1890 | 1894 | [('k', 'keep', None, _('keep patch file'))], |
General Comments 0
You need to be logged in to leave comments.
Login now