Show More
@@ -155,7 +155,8 b' class changesetprinter(object):' | |||
|
155 | 155 | self.buffered = buffered |
|
156 | 156 | self._differ = differ or changesetdiffer() |
|
157 | 157 | self._diffopts = patch.diffallopts(ui, diffopts) |
|
158 | self.diffopts = diffopts or {} | |
|
158 | self._includestat = diffopts and diffopts.get('stat') | |
|
159 | self._includediff = diffopts and diffopts.get('patch') | |
|
159 | 160 | self.header = {} |
|
160 | 161 | self.hunk = {} |
|
161 | 162 | self.lastheader = None |
@@ -299,15 +300,13 b' class changesetprinter(object):' | |||
|
299 | 300 | ''' |
|
300 | 301 | |
|
301 | 302 | def _showpatch(self, ctx): |
|
302 | stat = self.diffopts.get('stat') | |
|
303 | diff = self.diffopts.get('patch') | |
|
304 | if stat: | |
|
303 | if self._includestat: | |
|
305 | 304 | self._differ.showdiff(self.ui, ctx, self._diffopts, stat=True) |
|
306 | if stat and diff: | |
|
305 | if self._includestat and self._includediff: | |
|
307 | 306 | self.ui.write("\n") |
|
308 | if diff: | |
|
307 | if self._includediff: | |
|
309 | 308 | self._differ.showdiff(self.ui, ctx, self._diffopts, stat=False) |
|
310 | if stat or diff: | |
|
309 | if self._includestat or self._includediff: | |
|
311 | 310 | self.ui.write("\n") |
|
312 | 311 | |
|
313 | 312 | class changesetformatter(changesetprinter): |
@@ -368,13 +367,11 b' class changesetformatter(changesetprinte' | |||
|
368 | 367 | fm.data(copies=fm.formatdict(copies, |
|
369 | 368 | key='name', value='source')) |
|
370 | 369 | |
|
371 | stat = self.diffopts.get('stat') | |
|
372 | diff = self.diffopts.get('patch') | |
|
373 | if stat: | |
|
370 | if self._includestat: | |
|
374 | 371 | self.ui.pushbuffer() |
|
375 | 372 | self._differ.showdiff(self.ui, ctx, self._diffopts, stat=True) |
|
376 | 373 | fm.data(diffstat=self.ui.popbuffer()) |
|
377 | if diff: | |
|
374 | if self._includediff: | |
|
378 | 375 | self.ui.pushbuffer() |
|
379 | 376 | self._differ.showdiff(self.ui, ctx, self._diffopts, stat=False) |
|
380 | 377 | fm.data(diff=self.ui.popbuffer()) |
General Comments 0
You need to be logged in to leave comments.
Login now