Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 11061:51d0387523c6
log: add --stat for diffstat output
log --stat shows diffstat in place of patch output.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 01 Apr 2010 00:35:12 +0900 |
parents | ef4aa90b1e58 |
children | e8d10d085f47 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sat Apr 03 11:58:16 2010 +1100 +++ b/mercurial/cmdutil.py Thu Apr 01 00:35:12 2010 +0900 @@ -803,11 +803,11 @@ def showpatch(self, node): if self.patch: + stat = self.diffopts.get('stat') + diffopts = patch.diffopts(self.ui, self.diffopts) prev = self.repo.changelog.parents(node)[0] - chunks = patch.diffui(self.repo, prev, node, match=self.patch, - opts=patch.diffopts(self.ui, self.diffopts)) - for chunk, label in chunks: - self.ui.write(chunk, label=label) + diffordiffstat(self.ui, self.repo, diffopts, prev, node, + match=self.patch, stat=stat) self.ui.write("\n") def _meaningful_parentrevs(self, log, rev): @@ -939,7 +939,7 @@ """ # options patch = False - if opts.get('patch'): + if opts.get('patch') or opts.get('stat'): patch = matchfn or matchall(repo) tmpl = opts.get('template')