changeset 6282:709652cd7bff

test-mv-cp-st-diff: avoid linkrev collisions The copy detection code relies heavily on the linkrevs, so it's better to avoid collisions in this test.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 15 Mar 2008 22:03:18 -0300
parents 3e5f99b13998
children 5a45c82fc7da
files tests/test-mv-cp-st-diff tests/test-mv-cp-st-diff.out
diffstat 2 files changed, 216 insertions(+), 90 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-mv-cp-st-diff	Sun Mar 16 00:35:14 2008 +0100
+++ b/tests/test-mv-cp-st-diff	Sat Mar 15 22:03:18 2008 -0300
@@ -28,6 +28,7 @@
     echo
 }
 
+count=0
 # make a new branch and get diff/status output
 # $1 - first commit
 # $2 - second commit
@@ -37,6 +38,9 @@
 {
     hg co -q -C 0
 
+    add a $count
+    count=`expr $count + 1`
+    hg ci -m "t0"
     $1
     hg ci -m "t1"
     $2
--- a/tests/test-mv-cp-st-diff.out	Sun Mar 16 00:35:14 2008 +0100
+++ b/tests/test-mv-cp-st-diff.out	Sat Mar 15 22:03:18 2008 -0300
@@ -19,8 +19,9 @@
 rename to b
 --- a/a
 +++ b/b
-@@ -1,1 +1,3 @@
+@@ -1,1 +1,4 @@
  a
++0
 +a1
 +a2
 
@@ -34,10 +35,11 @@
 rename to b
 --- a/a
 +++ b/b
-@@ -1,3 +1,3 @@
+@@ -1,3 +1,4 @@
  a
 -m1
 -m2
++0
 +a1
 +a2
 
@@ -47,8 +49,9 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,1 +1,3 @@
+@@ -1,1 +1,4 @@
  a
++0
 +a1
 +a2
 
@@ -58,8 +61,9 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,3 +1,1 @@
+@@ -1,4 +1,1 @@
  a
+-0
 -a1
 -a2
 
@@ -69,10 +73,11 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,3 +1,3 @@
+@@ -1,3 +1,4 @@
  a
 -m1
 -m2
++0
 +a1
 +a2
 
@@ -82,8 +87,9 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,3 +1,3 @@
+@@ -1,4 +1,3 @@
  a
+-0
 -a1
 -a2
 +m1
@@ -108,8 +114,9 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,1 +1,3 @@
+@@ -1,1 +1,4 @@
  a
++1
 +a1
 +a2
 diff --git a/a b/b
@@ -117,8 +124,9 @@
 copy to b
 --- a/a
 +++ b/b
-@@ -1,1 +1,3 @@
+@@ -1,1 +1,4 @@
  a
++1
 +a1
 +a2
 
@@ -130,10 +138,11 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,3 +1,3 @@
+@@ -1,3 +1,4 @@
  a
 -m1
 -m2
++1
 +a1
 +a2
 diff --git a/a b/b
@@ -141,10 +150,11 @@
 copy to b
 --- a/a
 +++ b/b
-@@ -1,3 +1,3 @@
+@@ -1,3 +1,4 @@
  a
 -m1
 -m2
++1
 +a1
 +a2
 
@@ -154,8 +164,9 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,1 +1,3 @@
+@@ -1,1 +1,4 @@
  a
++1
 +a1
 +a2
 
@@ -165,8 +176,9 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,3 +1,1 @@
+@@ -1,4 +1,1 @@
  a
+-1
 -a1
 -a2
 
@@ -176,10 +188,11 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,3 +1,3 @@
+@@ -1,3 +1,4 @@
  a
 -m1
 -m2
++1
 +a1
 +a2
 
@@ -189,8 +202,9 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,3 +1,3 @@
+@@ -1,4 +1,3 @@
  a
+-1
 -a1
 -a2
 +m1
@@ -205,8 +219,9 @@
 diff --git a/b b/b
 --- a/b
 +++ b/b
-@@ -1,2 +1,3 @@
+@@ -1,3 +1,4 @@
  a
+ 2
  b1
 +w
 
@@ -220,8 +235,9 @@
 rename to b
 --- a/a
 +++ b/b
-@@ -1,1 +1,3 @@
+@@ -1,1 +1,4 @@
  a
++2
 +b1
 +w
 
@@ -235,10 +251,11 @@
 rename to b
 --- a/a
 +++ b/b
-@@ -1,3 +1,3 @@
+@@ -1,3 +1,4 @@
  a
 -m1
 -m2
++2
 +b1
 +w
 
@@ -252,8 +269,9 @@
 rename to b
 --- a/a
 +++ b/b
-@@ -1,1 +1,2 @@
+@@ -1,1 +1,3 @@
  a
++2
 +b1
 
 - parent to root: --rev . --rev 0
@@ -266,8 +284,9 @@
 rename to a
 --- a/b
 +++ b/a
-@@ -1,2 +1,1 @@
+@@ -1,3 +1,1 @@
  a
+-2
 -b1
 
 - branch to parent: --rev 2 --rev .
@@ -280,10 +299,11 @@
 rename to b
 --- a/a
 +++ b/b
-@@ -1,3 +1,2 @@
+@@ -1,3 +1,3 @@
  a
 -m1
 -m2
++2
 +b1
 
 - parent to branch: --rev . --rev 2
@@ -296,8 +316,9 @@
 rename to a
 --- a/b
 +++ b/a
-@@ -1,2 +1,3 @@
+@@ -1,3 +1,3 @@
  a
+-2
 -b1
 +m1
 +m2
@@ -311,8 +332,9 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,1 +1,2 @@
+@@ -1,2 +1,3 @@
  a
+ 3
 +w
 
 - working to root: --rev 0
@@ -323,19 +345,87 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,1 +1,2 @@
+@@ -1,1 +1,3 @@
+ a
++3
++w
+diff --git a/a b/b
+copy from a
+copy to b
+--- a/a
++++ b/b
+@@ -1,1 +1,3 @@
  a
++3
++b1
+
+- working to branch: --rev 2
+M a
+A b
+  a
+
+diff --git a/a b/a
+--- a/a
++++ b/a
+@@ -1,3 +1,3 @@
+ a
+-m1
+-m2
++3
 +w
 diff --git a/a b/b
 copy from a
 copy to b
 --- a/a
 +++ b/b
+@@ -1,3 +1,3 @@
+ a
+-m1
+-m2
++3
++b1
+
+- root to parent: --rev 0 --rev .
+M a
+A b
+  a
+
+diff --git a/a b/a
+--- a/a
++++ b/a
 @@ -1,1 +1,2 @@
  a
++3
+diff --git a/a b/b
+copy from a
+copy to b
+--- a/a
++++ b/b
+@@ -1,1 +1,3 @@
+ a
++3
 +b1
 
-- working to branch: --rev 2
+- parent to root: --rev . --rev 0
+M a
+R b
+
+diff --git a/a b/a
+--- a/a
++++ b/a
+@@ -1,2 +1,1 @@
+ a
+-3
+diff --git a/b b/b
+deleted file mode 100644
+--- a/b
++++ /dev/null
+@@ -1,3 +0,0 @@
+-a
+-3
+-b1
+
+- branch to parent: --rev 2 --rev .
 M a
 A b
   a
@@ -347,63 +437,17 @@
  a
 -m1
 -m2
-+w
-diff --git a/a b/b
-copy from a
-copy to b
---- a/a
-+++ b/b
-@@ -1,3 +1,2 @@
- a
--m1
--m2
-+b1
-
-- root to parent: --rev 0 --rev .
-A b
-  a
-
++3
 diff --git a/a b/b
 copy from a
 copy to b
 --- a/a
 +++ b/b
-@@ -1,1 +1,2 @@
- a
-+b1
-
-- parent to root: --rev . --rev 0
-R b
-
-diff --git a/b b/b
-deleted file mode 100644
---- a/b
-+++ /dev/null
-@@ -1,2 +0,0 @@
--a
--b1
-
-- branch to parent: --rev 2 --rev .
-M a
-A b
-  a
-
-diff --git a/a b/a
---- a/a
-+++ b/a
-@@ -1,3 +1,1 @@
+@@ -1,3 +1,3 @@
  a
 -m1
 -m2
-diff --git a/a b/b
-copy from a
-copy to b
---- a/a
-+++ b/b
-@@ -1,3 +1,2 @@
- a
--m1
--m2
++3
 +b1
 
 - parent to branch: --rev . --rev 2
@@ -413,16 +457,18 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,1 +1,3 @@
+@@ -1,2 +1,3 @@
  a
+-3
 +m1
 +m2
 diff --git a/b b/b
 deleted file mode 100644
 --- a/b
 +++ /dev/null
-@@ -1,2 +0,0 @@
+@@ -1,3 +0,0 @@
 -a
+-3
 -b1
 
 
@@ -445,6 +491,11 @@
 diff --git a/a b/d
 rename from a
 rename to d
+--- a/a
++++ b/d
+@@ -1,1 +1,2 @@
+ a
++4
 
 - working to branch: --rev 2
 A d
@@ -456,10 +507,11 @@
 rename to d
 --- a/a
 +++ b/d
-@@ -1,3 +1,1 @@
+@@ -1,3 +1,2 @@
  a
 -m1
 -m2
++4
 
 - root to parent: --rev 0 --rev .
 A c
@@ -469,6 +521,11 @@
 diff --git a/a b/c
 rename from a
 rename to c
+--- a/a
++++ b/c
+@@ -1,1 +1,2 @@
+ a
++4
 
 - parent to root: --rev . --rev 0
 A a
@@ -478,6 +535,11 @@
 diff --git a/c b/a
 rename from c
 rename to a
+--- a/c
++++ b/a
+@@ -1,2 +1,1 @@
+ a
+-4
 
 - branch to parent: --rev 2 --rev .
 A c
@@ -489,10 +551,11 @@
 rename to c
 --- a/a
 +++ b/c
-@@ -1,3 +1,1 @@
+@@ -1,3 +1,2 @@
  a
 -m1
 -m2
++4
 
 - parent to branch: --rev . --rev 2
 A a
@@ -504,8 +567,9 @@
 rename to a
 --- a/c
 +++ b/a
-@@ -1,1 +1,3 @@
+@@ -1,2 +1,3 @@
  a
+-4
 +m1
 +m2
 
@@ -521,6 +585,7 @@
 copy to d
 
 - working to root: --rev 0
+M a
 A b
   a
 A c
@@ -528,15 +593,36 @@
 A d
   a
 
+diff --git a/a b/a
+--- a/a
++++ b/a
+@@ -1,1 +1,2 @@
+ a
++5
 diff --git a/a b/b
 copy from a
 copy to b
+--- a/a
++++ b/b
+@@ -1,1 +1,2 @@
+ a
++5
 diff --git a/a b/c
 copy from a
 copy to c
+--- a/a
++++ b/c
+@@ -1,1 +1,2 @@
+ a
++5
 diff --git a/a b/d
 copy from a
 copy to d
+--- a/a
++++ b/d
+@@ -1,1 +1,2 @@
+ a
++5
 
 - working to branch: --rev 2
 M a
@@ -550,67 +636,97 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,3 +1,1 @@
+@@ -1,3 +1,2 @@
  a
 -m1
 -m2
++5
 diff --git a/a b/b
 copy from a
 copy to b
 --- a/a
 +++ b/b
-@@ -1,3 +1,1 @@
+@@ -1,3 +1,2 @@
  a
 -m1
 -m2
++5
 diff --git a/a b/c
 copy from a
 copy to c
 --- a/a
 +++ b/c
-@@ -1,3 +1,1 @@
+@@ -1,3 +1,2 @@
  a
 -m1
 -m2
++5
 diff --git a/a b/d
 copy from a
 copy to d
 --- a/a
 +++ b/d
-@@ -1,3 +1,1 @@
+@@ -1,3 +1,2 @@
  a
 -m1
 -m2
++5
 
 - root to parent: --rev 0 --rev .
+M a
 A b
   a
 A c
   a
 
+diff --git a/a b/a
+--- a/a
++++ b/a
+@@ -1,1 +1,2 @@
+ a
++5
 diff --git a/a b/b
 copy from a
 copy to b
+--- a/a
++++ b/b
+@@ -1,1 +1,2 @@
+ a
++5
 diff --git a/a b/c
 copy from a
 copy to c
+--- a/a
++++ b/c
+@@ -1,1 +1,2 @@
+ a
++5
 
 - parent to root: --rev . --rev 0
+M a
 R b
 R c
 
+diff --git a/a b/a
+--- a/a
++++ b/a
+@@ -1,2 +1,1 @@
+ a
+-5
 diff --git a/b b/b
 deleted file mode 100644
 --- a/b
 +++ /dev/null
-@@ -1,1 +0,0 @@
+@@ -1,2 +0,0 @@
 -a
+-5
 diff --git a/c b/c
 deleted file mode 100644
 --- a/c
 +++ /dev/null
-@@ -1,1 +0,0 @@
+@@ -1,2 +0,0 @@
 -a
+-5
 
 - branch to parent: --rev 2 --rev .
 M a
@@ -622,28 +738,31 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,3 +1,1 @@
+@@ -1,3 +1,2 @@
  a
 -m1
 -m2
++5
 diff --git a/a b/b
 copy from a
 copy to b
 --- a/a
 +++ b/b
-@@ -1,3 +1,1 @@
+@@ -1,3 +1,2 @@
  a
 -m1
 -m2
++5
 diff --git a/a b/c
 copy from a
 copy to c
 --- a/a
 +++ b/c
-@@ -1,3 +1,1 @@
+@@ -1,3 +1,2 @@
  a
 -m1
 -m2
++5
 
 - parent to branch: --rev . --rev 2
 M a
@@ -653,21 +772,24 @@
 diff --git a/a b/a
 --- a/a
 +++ b/a
-@@ -1,1 +1,3 @@
+@@ -1,2 +1,3 @@
  a
+-5
 +m1
 +m2
 diff --git a/b b/b
 deleted file mode 100644
 --- a/b
 +++ /dev/null
-@@ -1,1 +0,0 @@
+@@ -1,2 +0,0 @@
 -a
+-5
 diff --git a/c b/c
 deleted file mode 100644
 --- a/c
 +++ /dev/null
-@@ -1,1 +0,0 @@
+@@ -1,2 +0,0 @@
 -a
+-5