##// END OF EJS Templates
mq: fix opts['unified'] = '0' to take effect when qdiff --stat...
Yuya Nishihara -
r11049:a84f1422 default
parent child Browse files
Show More
@@ -477,8 +477,6 b' class queue(object):'
477 def printdiff(self, repo, diffopts, node1, node2=None, files=None,
477 def printdiff(self, repo, diffopts, node1, node2=None, files=None,
478 fp=None, changes=None, opts={}):
478 fp=None, changes=None, opts={}):
479 stat = opts.get('stat')
479 stat = opts.get('stat')
480 if stat:
481 opts['unified'] = '0'
482
480
483 m = cmdutil.match(repo, files, opts)
481 m = cmdutil.match(repo, files, opts)
484 if fp is None:
482 if fp is None:
@@ -487,6 +485,7 b' class queue(object):'
487 def write(s, **kw):
485 def write(s, **kw):
488 fp.write(s)
486 fp.write(s)
489 if stat:
487 if stat:
488 diffopts.context = 0
490 width = self.ui.interactive() and util.termwidth() or 80
489 width = self.ui.interactive() and util.termwidth() or 80
491 chunks = patch.diff(repo, node1, node2, m, changes, diffopts)
490 chunks = patch.diff(repo, node1, node2, m, changes, diffopts)
492 for chunk, label in patch.diffstatui(util.iterlines(chunks),
491 for chunk, label in patch.diffstatui(util.iterlines(chunks),
@@ -68,3 +68,5 b' hg qrefresh --git'
68 echo a >> lines
68 echo a >> lines
69 hg qdiff
69 hg qdiff
70
70
71 echo % qdiff --stat
72 hg qdiff --stat
@@ -122,3 +122,6 b' diff --git a/lines b/lines'
122 8
122 8
123 9
123 9
124 +a
124 +a
125 % qdiff --stat
126 lines | 7 +++++--
127 1 files changed, 5 insertions(+), 2 deletions(-)
General Comments 0
You need to be logged in to leave comments. Login now