Mercurial > public > mercurial-scm > hg-stable
diff hgext/record.py @ 11728:226a328a7ff3
record: count lines changed as the number of lines added or removed
per "record" hunk
Record deals in hunks which are tighter than traditional patch hunks,
really only a single run of additions/removals. Another addition, even a
line after a fixed line is treated as a new hunk by record.
author | timeless <timeless@gmail.com> |
---|---|
date | Thu, 22 Jul 2010 18:47:46 +0300 |
parents | 9bbfeba33aa3 |
children | 00658492e2aa |
line wrap: on
line diff
--- a/hgext/record.py Sun Aug 01 13:52:42 2010 -0500 +++ b/hgext/record.py Thu Jul 22 18:47:46 2010 +0300 @@ -97,7 +97,7 @@ if h.startswith('---'): fp.write(_('%d hunks, %d lines changed\n') % (len(self.hunks), - sum([h.added + h.removed for h in self.hunks]))) + sum([max(h.added, h.removed) for h in self.hunks]))) break fp.write(h)