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