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