equal
deleted
inserted
replaced
276 ctx = context.resource(mapping, 'ctx') |
276 ctx = context.resource(mapping, 'ctx') |
277 s = ctx.description() |
277 s = ctx.description() |
278 if isinstance(s, encoding.localstr): |
278 if isinstance(s, encoding.localstr): |
279 # try hard to preserve utf-8 bytes |
279 # try hard to preserve utf-8 bytes |
280 return encoding.tolocal(encoding.fromlocal(s).strip()) |
280 return encoding.tolocal(encoding.fromlocal(s).strip()) |
|
281 elif isinstance(s, encoding.safelocalstr): |
|
282 return encoding.safelocalstr(s.strip()) |
281 else: |
283 else: |
282 return s.strip() |
284 return s.strip() |
283 |
285 |
284 @templatekeyword('diffstat', requires={'ctx'}) |
286 @templatekeyword('diffstat', requires={'ctx'}) |
285 def showdiffstat(context, mapping): |
287 def showdiffstat(context, mapping): |