Mercurial > public > mercurial-scm > hg-stable
diff hgext/notify.py @ 3096:f422c8265ae5
Add support for diffstat in commit emails, and move diffstat from
patchbomb to patch
author | Matt Doar <matt@xensource.com> |
---|---|
date | Wed, 13 Sep 2006 13:14:08 -0700 |
parents | 47aad3489da8 |
children | f0415b61949d |
line wrap: on
line diff
--- a/hgext/notify.py Thu Sep 14 19:24:00 2006 -0700 +++ b/hgext/notify.py Wed Sep 13 13:14:08 2006 -0700 @@ -240,6 +240,9 @@ prev = self.repo.changelog.parents(node)[0] patch.diff(self.repo, prev, ref, fp=fp) difflines = fp.getvalue().splitlines(1) + if self.ui.configbool('notify', 'diffstat', True): + s = patch.diffstat(difflines) + self.sio.write('\ndiffstat:\n\n' + s) if maxdiff > 0 and len(difflines) > maxdiff: self.sio.write(_('\ndiffs (truncated from %d to %d lines):\n\n') % (len(difflines), maxdiff))