Show More
@@ -282,7 +282,8 b' class changesetprinter(object):' | |||||
282 | def _showpatch(self, ctx): |
|
282 | def _showpatch(self, ctx): | |
283 | matchfn = self._makefilematcher(ctx) |
|
283 | matchfn = self._makefilematcher(ctx) | |
284 | hunksfilterfn = self._makehunksfilter(ctx) |
|
284 | hunksfilterfn = self._makehunksfilter(ctx) | |
285 | if matchfn: |
|
285 | if not matchfn: | |
|
286 | return | |||
286 |
|
|
287 | stat = self.diffopts.get('stat') | |
287 |
|
|
288 | diff = self.diffopts.get('patch') | |
288 |
|
|
289 | diffopts = patch.diffallopts(self.ui, self.diffopts) | |
@@ -292,9 +293,9 b' class changesetprinter(object):' | |||||
292 |
|
|
293 | diffordiffstat(self.ui, self.repo, diffopts, prev, node, | |
293 |
|
|
294 | match=matchfn, stat=True, | |
294 |
|
|
295 | hunksfilterfn=hunksfilterfn) | |
|
296 | if stat and diff: | |||
|
297 | self.ui.write("\n") | |||
295 |
|
|
298 | if diff: | |
296 | if stat: |
|
|||
297 | self.ui.write("\n") |
|
|||
298 |
|
|
299 | diffordiffstat(self.ui, self.repo, diffopts, prev, node, | |
299 |
|
|
300 | match=matchfn, stat=False, | |
300 |
|
|
301 | hunksfilterfn=hunksfilterfn) | |
@@ -383,18 +384,17 b' class jsonchangeset(changesetprinter):' | |||||
383 | for k, v in copies)) |
|
384 | for k, v in copies)) | |
384 |
|
385 | |||
385 | matchfn = self._makefilematcher(ctx) |
|
386 | matchfn = self._makefilematcher(ctx) | |
386 | if matchfn: |
|
|||
387 |
|
|
387 | stat = self.diffopts.get('stat') | |
388 |
|
|
388 | diff = self.diffopts.get('patch') | |
389 |
|
|
389 | diffopts = patch.difffeatureopts(self.ui, self.diffopts, git=True) | |
390 |
|
|
390 | node, prev = ctx.node(), ctx.p1().node() | |
391 |
|
|
391 | if matchfn and stat: | |
392 |
|
|
392 | self.ui.pushbuffer() | |
393 |
|
|
393 | diffordiffstat(self.ui, self.repo, diffopts, prev, node, | |
394 |
|
|
394 | match=matchfn, stat=True) | |
395 |
|
|
395 | self.ui.write((',\n "diffstat": "%s"') | |
396 |
|
|
396 | % j(self.ui.popbuffer())) | |
397 |
|
|
397 | if matchfn and diff: | |
398 |
|
|
398 | self.ui.pushbuffer() | |
399 |
|
|
399 | diffordiffstat(self.ui, self.repo, diffopts, prev, node, | |
400 |
|
|
400 | match=matchfn, stat=False) |
General Comments 0
You need to be logged in to leave comments.
Login now