Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/notify.py @ 4081:e6d26e71f049
merge with crew-stable
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Tue, 13 Feb 2007 10:25:45 -0200 |
parents | 6b4127c7d52a 1305ba7dee88 |
children | 49237d6ae97d |
comparison
equal
deleted
inserted
replaced
4073:95ffa36d1d2a | 4081:e6d26e71f049 |
---|---|
238 self.ui.pushbuffer() | 238 self.ui.pushbuffer() |
239 patch.diff(self.repo, prev, ref) | 239 patch.diff(self.repo, prev, ref) |
240 difflines = self.ui.popbuffer().splitlines(1) | 240 difflines = self.ui.popbuffer().splitlines(1) |
241 if self.ui.configbool('notify', 'diffstat', True): | 241 if self.ui.configbool('notify', 'diffstat', True): |
242 s = patch.diffstat(difflines) | 242 s = patch.diffstat(difflines) |
243 self.ui.write('\ndiffstat:\n\n' + s) | 243 # s may be nil, don't include the header if it is |
244 if s: | |
245 self.ui.write('\ndiffstat:\n\n%s' % s) | |
244 if maxdiff > 0 and len(difflines) > maxdiff: | 246 if maxdiff > 0 and len(difflines) > maxdiff: |
245 self.ui.write(_('\ndiffs (truncated from %d to %d lines):\n\n') % | 247 self.ui.write(_('\ndiffs (truncated from %d to %d lines):\n\n') % |
246 (len(difflines), maxdiff)) | 248 (len(difflines), maxdiff)) |
247 difflines = difflines[:maxdiff] | 249 difflines = difflines[:maxdiff] |
248 elif difflines: | 250 elif difflines: |