equal
deleted
inserted
replaced
542 except IndexError: |
542 except IndexError: |
543 pass |
543 pass |
544 |
544 |
545 return templatefilters.fill(text, width, initindent, hangindent) |
545 return templatefilters.fill(text, width, initindent, hangindent) |
546 |
546 |
|
547 @templatefunc('formatnode(node)') |
|
548 def formatnode(context, mapping, args): |
|
549 """Obtain the preferred form of a changeset hash. (DEPRECATED)""" |
|
550 if len(args) != 1: |
|
551 # i18n: "formatnode" is a keyword |
|
552 raise error.ParseError(_("formatnode expects one argument")) |
|
553 |
|
554 ui = mapping['ui'] |
|
555 node = evalstring(context, mapping, args[0]) |
|
556 if ui.debugflag: |
|
557 return node |
|
558 return templatefilters.short(node) |
|
559 |
547 @templatefunc('pad(text, width[, fillchar=\' \'[, left=False]])') |
560 @templatefunc('pad(text, width[, fillchar=\' \'[, left=False]])') |
548 def pad(context, mapping, args): |
561 def pad(context, mapping, args): |
549 """Pad text with a |
562 """Pad text with a |
550 fill character.""" |
563 fill character.""" |
551 if not (2 <= len(args) <= 4): |
564 if not (2 <= len(args) <= 4): |