# HG changeset patch # User Matt Mackall # Date 1280264640 18000 # Node ID efcdf6a953a09efbf06129556a1d07c3ee04e0e0 # Parent 708291e9389cb4c84c4f86935fd77fe9a717f5a6# Parent 52e4ac3e63f780114c5b7613fe0643b305d09789 Merge with stable diff -r 708291e9389c -r efcdf6a953a0 mercurial/commands.py --- a/mercurial/commands.py Tue Jul 27 16:03:42 2010 -0500 +++ b/mercurial/commands.py Tue Jul 27 16:04:00 2010 -0500 @@ -3650,6 +3650,8 @@ for n in names: if n in ['tip', '.', 'null']: raise util.Abort(_('the name \'%s\' is reserved') % n) + if not n: + raise util.Abort(_('tag names cannot consist entirely of whitespace')) if opts.get('rev') and opts.get('remove'): raise util.Abort(_("--rev and --remove are incompatible")) if opts.get('rev'): diff -r 708291e9389c -r efcdf6a953a0 tests/test-tag --- a/tests/test-tag Tue Jul 27 16:03:42 2010 -0500 +++ b/tests/test-tag Tue Jul 27 16:04:00 2010 -0500 @@ -7,6 +7,9 @@ hg add a hg commit -m "test" -d "1000000 0" hg history + +hg tag ' ' + hg tag -d "1000000 0" "bleah" hg history diff -r 708291e9389c -r efcdf6a953a0 tests/test-tag.out --- a/tests/test-tag.out Tue Jul 27 16:03:42 2010 -0500 +++ b/tests/test-tag.out Tue Jul 27 16:04:00 2010 -0500 @@ -4,6 +4,7 @@ date: Mon Jan 12 13:46:40 1970 +0000 summary: test +abort: tag names cannot consist entirely of whitespace changeset: 1:3ecf002a1c57 tag: tip user: test