diff hgext/mq.py @ 6668:034f444902d9

mq: qdiff: support all diffopts
author Jason Orendorff <jorendorff@mozilla.com>
date Thu, 12 Jun 2008 07:38:15 -0500
parents 2c9565971abc
children f6c00b17387c
line wrap: on
line diff
--- a/hgext/mq.py	Thu Jun 12 11:01:36 2008 +0200
+++ b/hgext/mq.py	Thu Jun 12 07:38:15 2008 -0500
@@ -967,10 +967,7 @@
             self.ui.write("No patches applied\n")
             return
         qp = self.qparents(repo, top)
-        if opts.get('git'):
-            self.diffopts().git = True
-        if opts.get('unified') is not None:
-            self.diffopts().context = opts['unified']
+        self._diffopts = patch.diffopts(self.ui, opts)
         self.printdiff(repo, qp, files=pats, opts=opts)
 
     def refresh(self, repo, pats=None, **opts):
@@ -2355,10 +2352,8 @@
          _('hg qcommit [OPTION]... [FILE]...')),
     "^qdiff":
         (diff,
-         [('g', 'git', None, _('use git extended diff format')),
-          ('U', 'unified', 3, _('number of lines of context to show')),
-         ] + commands.walkopts,
-         _('hg qdiff [-I] [-X] [-U NUM] [-g] [FILE]...')),
+         commands.diffopts + commands.diffopts2 + commands.walkopts,
+         _('hg qdiff [OPTION]... [FILE]...')),
     "qdelete|qremove|qrm":
         (delete,
          [('k', 'keep', None, _('keep patch file')),