diff -r fae47ecaa952 -r 05390cfe678a mercurial/commands.py --- a/mercurial/commands.py Sat May 11 20:25:15 2013 -0500 +++ b/mercurial/commands.py Mon May 13 13:02:01 2013 -0500 @@ -955,6 +955,9 @@ Returns 0 on success. """ + if label: + label = label.strip() + if not opts.get('clean') and not label: ui.write("%s\n" % repo.dirstate.branch()) return