comparison hgext/notify.py @ 3017:47aad3489da8

Fixed an exception in notify extension (b2a_hex argument incorrect) Detailed messages was - incoming.notify hook raised an exception: b2a_hex() argument 1 must be string or read-only character buffer, not stringio
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Thu, 24 Aug 2006 15:19:56 -0700
parents 20b95aef3fe0
children f422c8265ae5
comparison
equal deleted inserted replaced
3016:2b255c3478dc 3017:47aad3489da8
236 maxdiff = int(self.ui.config('notify', 'maxdiff', 300)) 236 maxdiff = int(self.ui.config('notify', 'maxdiff', 300))
237 if maxdiff == 0: 237 if maxdiff == 0:
238 return 238 return
239 fp = templater.stringio() 239 fp = templater.stringio()
240 prev = self.repo.changelog.parents(node)[0] 240 prev = self.repo.changelog.parents(node)[0]
241 patch.diff(self.repo, fp, prev, ref) 241 patch.diff(self.repo, prev, ref, fp=fp)
242 difflines = fp.getvalue().splitlines(1) 242 difflines = fp.getvalue().splitlines(1)
243 if maxdiff > 0 and len(difflines) > maxdiff: 243 if maxdiff > 0 and len(difflines) > maxdiff:
244 self.sio.write(_('\ndiffs (truncated from %d to %d lines):\n\n') % 244 self.sio.write(_('\ndiffs (truncated from %d to %d lines):\n\n') %
245 (len(difflines), maxdiff)) 245 (len(difflines), maxdiff))
246 difflines = difflines[:maxdiff] 246 difflines = difflines[:maxdiff]