1299 self.ui.write(_("summary: %s\n") % |
1299 self.ui.write(_("summary: %s\n") % |
1300 description.splitlines()[0], |
1300 description.splitlines()[0], |
1301 label='log.summary') |
1301 label='log.summary') |
1302 self.ui.write("\n") |
1302 self.ui.write("\n") |
1303 |
1303 |
1304 self.showpatch(changenode, matchfn) |
1304 self.showpatch(ctx, matchfn) |
1305 |
1305 |
1306 def showpatch(self, node, matchfn): |
1306 def showpatch(self, ctx, matchfn): |
1307 if not matchfn: |
1307 if not matchfn: |
1308 matchfn = self.matchfn |
1308 matchfn = self.matchfn |
1309 if matchfn: |
1309 if matchfn: |
1310 stat = self.diffopts.get('stat') |
1310 stat = self.diffopts.get('stat') |
1311 diff = self.diffopts.get('patch') |
1311 diff = self.diffopts.get('patch') |
1312 diffopts = patch.diffallopts(self.ui, self.diffopts) |
1312 diffopts = patch.diffallopts(self.ui, self.diffopts) |
1313 prev = self.repo.changelog.parents(node)[0] |
1313 node = ctx.node() |
|
1314 prev = ctx.p1() |
1314 if stat: |
1315 if stat: |
1315 diffordiffstat(self.ui, self.repo, diffopts, prev, node, |
1316 diffordiffstat(self.ui, self.repo, diffopts, prev, node, |
1316 match=matchfn, stat=True) |
1317 match=matchfn, stat=True) |
1317 if diff: |
1318 if diff: |
1318 if stat: |
1319 if stat: |
1490 self.ui.write(h) |
1491 self.ui.write(h) |
1491 |
1492 |
1492 # write changeset metadata, then patch if requested |
1493 # write changeset metadata, then patch if requested |
1493 key = self._parts['changeset'] |
1494 key = self._parts['changeset'] |
1494 self.ui.write(templater.stringify(self.t(key, **props))) |
1495 self.ui.write(templater.stringify(self.t(key, **props))) |
1495 self.showpatch(ctx.node(), matchfn) |
1496 self.showpatch(ctx, matchfn) |
1496 |
1497 |
1497 if self._parts['footer']: |
1498 if self._parts['footer']: |
1498 if not self.footer: |
1499 if not self.footer: |
1499 self.footer = templater.stringify( |
1500 self.footer = templater.stringify( |
1500 self.t(self._parts['footer'], **props)) |
1501 self.t(self._parts['footer'], **props)) |