diff tests/test-tags @ 4267:8185a1ca8628

tags: require -f to replace an existing tag based on a patch from Johan Herland <johherla@online.no>
author Matt Mackall <mpm@selenic.com>
date Fri, 23 Mar 2007 00:12:28 -0500
parents fe7f38dda34b
children 99f411ba0380
line wrap: on
line diff
--- a/tests/test-tags	Thu Mar 22 23:52:50 2007 -0500
+++ b/tests/test-tags	Fri Mar 23 00:12:28 2007 -0500
@@ -74,7 +74,7 @@
 echo >> foo
 hg ci -m 'change foo 1' -d '1000000 0' # rev 2
 hg up -C 1
-hg tag -r 1 -d '1000000 0' bar         # rev 3
+hg tag -r 1 -d '1000000 0' -f bar      # rev 3
 hg up -C 1
 echo >> foo
 hg ci -m 'change foo 2' -d '1000000 0' # rev 4
@@ -91,14 +91,17 @@
 cd t3
 echo foo > foo
 hg add foo
-hg ci -m 'add foo' -d '1000000 0'      # rev 0
-hg tag -d '1000000 0' bar              # rev 1 bar -> 0
-hg tag -d '1000000 0' bar              # rev 2 bar -> 1
-hg tag -d '1000000 0' -r 0 bar         # rev 3 bar -> 0
-hg tag -d '1000000 0' -r 1 bar         # rev 3 bar -> 1
-hg tag -d '1000000 0' -r 0 bar         # rev 4 bar -> 0
+hg ci -m 'add foo' -d '1000000 0'       # rev 0
+hg tag -d '1000000 0' -f bar            # rev 1 bar -> 0
+hg tag -d '1000000 0' -f bar            # rev 2 bar -> 1
+hg tag -d '1000000 0' -fr 0 bar         # rev 3 bar -> 0
+hg tag -d '1000000 0' -fr 1 bar         # rev 3 bar -> 1
+hg tag -d '1000000 0' -fr 0 bar         # rev 4 bar -> 0
 hg tags
 hg co 3
 echo barbar > foo
-hg ci -m 'change foo' -d '1000000 0'      # rev 0
+hg ci -m 'change foo' -d '1000000 0'    # rev 0
 hg tags
+
+hg tag -d '1000000 0' -r 3 bar         # should complain
+hg tags
\ No newline at end of file