[PATCH 1 of 1] tag: add tests for tags with whitespace (issue2174)

Afuna afunamatata at gmail.com
Fri Feb 11 08:31:12 CST 2011


# HG changeset patch
# User Afuna
# Date 1297434250 -28800
# Node ID 4b3a2b31b71e38160e170a8756f1bfa4ac9c525d
# Parent  d4ab9486e514dd24e21a2ca3b6c439ea13d85cab
tag: add tests for tags with whitespace (issue2174)

diff --git a/tests/test-tag.t b/tests/test-tag.t
--- a/tests/test-tag.t
+++ b/tests/test-tag.t
@@ -63,6 +63,18 @@
   $ hg tag -f gack
   $ hg tag --remove gack gorp
 
+  $ hg tag "bleah "
+  abort: tag 'bleah' already exists (use -f to force)
+  [255]
+  $ hg tag " bleah"
+  abort: tag 'bleah' already exists (use -f to force)
+  [255]
+  $ hg tag " bleah"
+  abort: tag 'bleah' already exists (use -f to force)
+  [255]
+  $ hg tag -r 0 "  bleahbleah  "
+  $ hg tag -r 0 " bleah bleah "
+
   $ cat .hgtags
   acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
   acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
@@ -75,6 +87,9 @@
   0000000000000000000000000000000000000000 gack
   336fccc858a4eb69609a291105009e484a6b6b8d gorp
   0000000000000000000000000000000000000000 gorp
+  acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
+  acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
+
   $ cat .hg/localtags
   d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
 
@@ -107,7 +122,9 @@ cloning local tags
   $ hg -R test log -r0:5
   changeset:   0:acb14030fe0a
   tag:         bleah
+  tag:         bleah bleah
   tag:         bleah0
+  tag:         bleahbleah
   tag:         foobar
   tag:         localblah
   user:        test
@@ -210,7 +227,7 @@ local tag with .hgtags modified
 
   $ hg tag hgtags-modified
   $ hg rollback
-  rolling back to revision 11 (undo commit)
+  rolling back to revision 13 (undo commit)
   $ hg st
   M .hgtags
   ? .hgtags.orig
@@ -227,7 +244,7 @@ tagging when at named-branch-head that's
   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ hg ci -m 'merge named branch'
-  $ hg up 11
+  $ hg up 13
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg tag new-topo-head
 


More information about the Mercurial-devel mailing list