Mercurial > hg
comparison mercurial/logcmdutil.py @ 35955:218b77c4c87a
logcmdutil: mark changesetprinter.showpatch() as private
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 21 Jan 2018 14:00:56 +0900 |
parents | 64f4a6808704 |
children | 0ff41ced4c12 |
comparison
equal
deleted
inserted
replaced
35954:386c1e45e671 | 35955:218b77c4c87a |
---|---|
249 else: | 249 else: |
250 self.ui.write(columns['summary'] % description.splitlines()[0], | 250 self.ui.write(columns['summary'] % description.splitlines()[0], |
251 label='log.summary') | 251 label='log.summary') |
252 self.ui.write("\n") | 252 self.ui.write("\n") |
253 | 253 |
254 self.showpatch(ctx, matchfn, hunksfilterfn=hunksfilterfn) | 254 self._showpatch(ctx, matchfn, hunksfilterfn=hunksfilterfn) |
255 | 255 |
256 def _showobsfate(self, ctx): | 256 def _showobsfate(self, ctx): |
257 obsfate = templatekw.showobsfate(repo=self.repo, ctx=ctx, ui=self.ui) | 257 obsfate = templatekw.showobsfate(repo=self.repo, ctx=ctx, ui=self.ui) |
258 | 258 |
259 if obsfate: | 259 if obsfate: |
263 | 263 |
264 def _exthook(self, ctx): | 264 def _exthook(self, ctx): |
265 '''empty method used by extension as a hook point | 265 '''empty method used by extension as a hook point |
266 ''' | 266 ''' |
267 | 267 |
268 def showpatch(self, ctx, matchfn, hunksfilterfn=None): | 268 def _showpatch(self, ctx, matchfn, hunksfilterfn=None): |
269 if not matchfn: | 269 if not matchfn: |
270 matchfn = self.matchfn | 270 matchfn = self.matchfn |
271 if matchfn: | 271 if matchfn: |
272 stat = self.diffopts.get('stat') | 272 stat = self.diffopts.get('stat') |
273 diff = self.diffopts.get('patch') | 273 diff = self.diffopts.get('patch') |
467 self.ui.write(h) | 467 self.ui.write(h) |
468 | 468 |
469 # write changeset metadata, then patch if requested | 469 # write changeset metadata, then patch if requested |
470 key = self._parts[self._tref] | 470 key = self._parts[self._tref] |
471 self.ui.write(templater.stringify(self.t(key, **props))) | 471 self.ui.write(templater.stringify(self.t(key, **props))) |
472 self.showpatch(ctx, matchfn, hunksfilterfn=hunksfilterfn) | 472 self._showpatch(ctx, matchfn, hunksfilterfn=hunksfilterfn) |
473 | 473 |
474 if self._parts['footer']: | 474 if self._parts['footer']: |
475 if not self.footer: | 475 if not self.footer: |
476 self.footer = templater.stringify( | 476 self.footer = templater.stringify( |
477 self.t(self._parts['footer'], **props)) | 477 self.t(self._parts['footer'], **props)) |