diff mercurial/commands.py @ 3767:1861fa38a6a7

Move ellipsis code to util.ellipsis() and improve maxlength handling.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sat, 02 Dec 2006 22:35:17 +0100
parents ad3d5b4367cb
children 73860ffbe798
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3031,8 +3031,7 @@ def dispatch(args):
         elif not inst[1]:
             u.warn(_(" empty string\n"))
         else:
-            u.warn("\n%r%s\n" %
-                    (inst[1][:400], len(inst[1]) > 400 and '...' or ''))
+            u.warn("\n%r\n" % util.ellipsis(inst[1]))
     except util.Abort, inst:
         u.warn(_("abort: %s\n") % inst)
     except TypeError, inst: