comparison tests/fixtures/renames.sh @ 1255:139a44a63090 stable 1.7

Merge default into stable for a release.
author Augie Fackler <raf@durin42.com>
date Wed, 05 Nov 2014 12:48:59 -0500
parents 0d0132cba155
children
comparison
equal deleted inserted replaced
1230:807c443928d4 1255:139a44a63090
1 #!/bin/sh 1 #!/bin/sh
2 # 2 #
3 # Generate renames.svndump 3 # Generate renames.svndump
4 # 4 #
5
6 set -e
7
8 rm -rf temp
5 9
6 mkdir temp 10 mkdir temp
7 cd temp 11 cd temp
8 12
9 mkdir project-orig 13 mkdir project-orig
19 svn co $svnurl project 23 svn co $svnurl project
20 cd project/trunk 24 cd project/trunk
21 # Entries for regular tests 25 # Entries for regular tests
22 echo a > a 26 echo a > a
23 echo b > b 27 echo b > b
28 ln -s a linka
29 ln -s b linkb
24 mkdir -p da/db 30 mkdir -p da/db
25 echo c > da/daf 31 echo c > da/daf
32 ln -s daf da/dalink
26 echo d > da/db/dbf 33 echo d > da/db/dbf
34 ln -s ../daf da/db/dblink
27 # Entries to test delete + copy 35 # Entries to test delete + copy
28 echo deleted > deletedfile 36 echo deleted > deletedfile
37 ln -s b deletedlink
29 mkdir deleteddir 38 mkdir deleteddir
30 echo deleteddir > deleteddir/f 39 echo deleteddir > deleteddir/f
40 ln -s f deleteddir/link
31 # Entries to test copy before change 41 # Entries to test copy before change
32 echo changed > changed 42 echo changed > changed
43 ln -s changed changedlink
33 mkdir changeddir 44 mkdir changeddir
34 echo changed2 > changeddir/f 45 echo changed2 > changeddir/f
46 ln -s f changeddir/link
35 # Entries unchanged in the rest of history 47 # Entries unchanged in the rest of history
36 echo unchanged > unchanged 48 echo unchanged > unchanged
49 ln -s unchanged unchangedlink
37 mkdir unchangeddir 50 mkdir unchangeddir
38 echo unchanged2 > unchangeddir/f 51 echo unchanged2 > unchangeddir/f
52 ln -s f unchangeddir/link
39 # One of the files will be changed afterwards, to test 53 # One of the files will be changed afterwards, to test
40 # group copies detection 54 # group copies detection
41 mkdir groupdir 55 mkdir groupdir
42 echo a > groupdir/a 56 echo a > groupdir/a
43 echo b > groupdir/b 57 echo b > groupdir/b
44 svn add a b da deletedfile deleteddir changed changeddir unchanged unchangeddir groupdir 58 ln -s a groupdir/linka
45 svn ci -m "add a and b" 59 ln -s b groupdir/linkb
60 svn add a b linka linkb da deleted* changed* unchanged* groupdir
61 svn ci -m "add everything"
46 # Remove files to be copied later 62 # Remove files to be copied later
47 svn rm deletedfile 63 svn rm deletedfile
48 svn rm deleteddir 64 svn rm deleteddir
65 svn rm deletedlink
49 # Update files to be copied before this change 66 # Update files to be copied before this change
50 echo changed >> changed 67 echo changed >> changed
51 echo changed2 >> changeddir/f 68 echo changed2 >> changeddir/f
69 ln -sfn changeddir/f changedlink
70 ln -sfn ../changed changeddir/link
52 # Update one of the groupdir files 71 # Update one of the groupdir files
53 echo a >> groupdir/a 72 echo a >> groupdir/a
73 ln -sfn ../a groupdir/linka
54 svn ci -m "delete files and dirs" 74 svn ci -m "delete files and dirs"
55 cd ../branches 75 cd ../branches
56 svn cp ../trunk branch1 76 svn cp ../trunk branch1
57 svn ci -m "create branch1" 77 svn ci -m "create branch1"
58 cd branch1 78 cd branch1
59 echo c > c 79 echo c > c
60 svn add c 80 ln -s c linkc
61 svn ci -m "add c" 81 svn add c linkc
82 svn ci -m "add c and linkc"
62 cd ../../trunk 83 cd ../../trunk
63 # Regular copy and rename 84 # Regular copy and rename
64 svn cp a a1 85 svn cp a a1
86 svn cp linka linka1
65 svn mv a a2 87 svn mv a a2
88 svn mv linka linka2
66 # Copy and update of source and dest 89 # Copy and update of source and dest
67 svn cp b b1 90 svn cp b b1
91 svn cp linkb linkb1
68 echo b >> b 92 echo b >> b
69 echo c >> b1 93 echo c >> b1
94 ln -sfn bb linkb
95 ln -sfn bc linkb1
70 # Directory copy and renaming 96 # Directory copy and renaming
71 svn cp da da1 97 svn cp da da1
72 svn mv da da2 98 svn mv da da2
73 # Test one copy operation in branch 99 # Test one copy operation in branch
74 cd ../branches/branch1 100 cd ../branches/branch1
75 svn cp c c1 101 svn cp c c1
102 svn cp linkc linkc1
76 echo c >> c1 103 echo c >> c1
104 ln -sfn cc linkc1
77 cd ../.. 105 cd ../..
78 svn ci -m "rename and copy a, b and da" 106 svn ci -m "rename and copy a, b, c and da, plus their links"
79 cd trunk 107 cd trunk
80 # Copy across branch 108 # Copy across branch
81 svn cp ../branches/branch1/c c 109 svn cp ../branches/branch1/c c
82 svn ci -m "copy b from branch1" 110 svn cp ../branches/branch1/linkc linkc
111 svn ci -m "copy c from branch1"
83 # Copy deleted stuff from the past 112 # Copy deleted stuff from the past
84 svn cp $svnurl/trunk/deletedfile@2 deletedfile 113 svn cp $svnurl/trunk/deletedfile@2 deletedfile
85 svn cp $svnurl/trunk/deleteddir@2 deleteddir 114 svn cp $svnurl/trunk/deleteddir@2 deleteddir
115 svn cp $svnurl/trunk/deletedlink@2 deletedlink
86 svn ci -m "copy stuff from the past" 116 svn ci -m "copy stuff from the past"
87 # Copy data from the past before it was changed 117 # Copy data from the past before it was changed
88 svn cp $svnurl/trunk/changed@2 changed2 118 svn cp $svnurl/trunk/changed@2 changed2
89 svn cp $svnurl/trunk/changeddir@2 changeddir2 119 svn cp $svnurl/trunk/changeddir@2 changeddir2
120 svn cp $svnurl/trunk/changedlink@2 changedlink2
90 # Harder, copy from the past before change and change it again 121 # Harder, copy from the past before change and change it again
91 # This confused the stupid diff path 122 # This confused the stupid diff path
92 svn cp $svnurl/trunk/changed@2 changed3 123 svn cp $svnurl/trunk/changed@2 changed3
124 svn cp $svnurl/trunk/changedlink@2 changedlink3
93 echo changed3 >> changed3 125 echo changed3 >> changed3
126 ln -sfn changed3 changedlink3
94 svn ci -m "copy stuff from the past before change" 127 svn ci -m "copy stuff from the past before change"
95 # Copy unchanged stuff from the past. Since no changed occured in these files 128 # Copy unchanged stuff from the past. Since no changed occured in these files
96 # between the source and parent revision, we record them as copy from parent 129 # between the source and parent revision, we record them as copy from parent
97 # instead of source rev. 130 # instead of source rev.
98 svn cp $svnurl/trunk/unchanged@2 unchanged2 131 svn cp $svnurl/trunk/unchanged@2 unchanged2
99 svn cp $svnurl/trunk/unchangeddir@2 unchangeddir2 132 svn cp $svnurl/trunk/unchangeddir@2 unchangeddir2
133 svn cp $svnurl/trunk/unchangedlink@2 unchangedlink2
100 svn ci -m "copy unchanged stuff from the past" 134 svn ci -m "copy unchanged stuff from the past"
101 # Copy groupdir, unfortunately one file was changed after r2 so the 135 # Copy groupdir, unfortunately one file was changed after r2 so the
102 # copy should not be recorded at all 136 # copy should not be recorded at all
103 svn cp $svnurl/trunk/groupdir@2 groupdir2 137 svn cp $svnurl/trunk/groupdir@2 groupdir2
104 svn ci -m "copy groupdir from the past" 138 svn ci -m "copy groupdir from the past"