diff mercurial/commands.py @ 4143:26314500a5e1

Don't truncate tag and branch names after 30 chars (introduced 73860ffbe798) with test added for a long (local) tag name.
author Thomas Arendsen Hein <thomas@intevation.de>
date Mon, 05 Mar 2007 19:48:21 +0100
parents ff08cebcd116
children 03e9c22a6489 30857b5779f8
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -275,9 +275,8 @@ def branches(ui, repo):
         if ui.quiet:
             ui.write("%s\n" % t)
         else:
-            t = util.localsub(t, 30)
-            t += " " * (30 - util.locallen(t))
-            ui.write("%s %s:%s\n" % (t, -r, hexfunc(n)))
+            spaces = " " * (30 - util.locallen(t))
+            ui.write("%s%s %s:%s\n" % (t, spaces, -r, hexfunc(n)))
 
 def bundle(ui, repo, fname, dest=None, **opts):
     """create a changegroup file
@@ -2474,9 +2473,8 @@ def tags(ui, repo):
         if ui.quiet:
             ui.write("%s\n" % t)
         else:
-            t = util.localsub(t, 30)
-            t += " " * (30 - util.locallen(t))
-            ui.write("%s %s\n" % (t, r))
+            spaces = " " * (30 - util.locallen(t))
+            ui.write("%s%s %s\n" % (t, spaces, r))
 
 def tip(ui, repo, **opts):
     """show the tip revision