# HG changeset patch # User Thomas Arendsen Hein # Date 1173120501 -3600 # Node ID 26314500a5e10ada4d892eef040541e310759a56 # Parent ba3e13306f70344653f08ebac32c04b004f00d4b Don't truncate tag and branch names after 30 chars (introduced 73860ffbe798) with test added for a long (local) tag name. diff -r ba3e13306f70 -r 26314500a5e1 mercurial/commands.py --- a/mercurial/commands.py Sun Mar 04 18:42:31 2007 +0100 +++ b/mercurial/commands.py Mon Mar 05 19:48:21 2007 +0100 @@ -275,9 +275,8 @@ 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 @@ 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 diff -r ba3e13306f70 -r 26314500a5e1 tests/test-tags --- a/tests/test-tags Sun Mar 04 18:42:31 2007 +0100 +++ b/tests/test-tags Mon Mar 05 19:48:21 2007 +0100 @@ -10,6 +10,9 @@ hg co hg identify T=`hg tip --debug | head -n 1 | cut -d : -f 3` +hg tag -l "This is a local tag with a really long name!" +hg tags +rm .hg/localtags echo "$T first" > .hgtags cat .hgtags hg add .hgtags diff -r ba3e13306f70 -r 26314500a5e1 tests/test-tags.out --- a/tests/test-tags.out Sun Mar 04 18:42:31 2007 +0100 +++ b/tests/test-tags.out Mon Mar 05 19:48:21 2007 +0100 @@ -1,6 +1,8 @@ unknown 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0acdaf898367 tip +tip 0:0acdaf898367 +This is a local tag with a really long name! 0:0acdaf898367 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 first tip 1:8a3ca90d111d first 0:0acdaf898367