Add an API to affect the choice of RCS parser.
[cvs2svn.git] / test-data / nasty-graphs-cvsrepos / make-nasty-graphs.sh
blobe57b01dc4def85e824d2143ad309acb34b85fe19
1 #! /bin/sh
3 # This script can be moved to the test-data directory and executed
4 # there to recreate nasty-graphs-cvsrepos. (Well, approximately. It
5 # doesn't clean up CVSROOT or add CVSROOT/README.)
7 CVSROOT=`pwd`/nasty-graphs-cvsrepos
8 export CVSROOT
9 rm -rf $CVSROOT
11 WC=`pwd`/cvs2svn-tmp
12 rm -rf $WC
14 cvs init
16 cvs co -d $WC .
19 # +-> A -> B --+
20 # | |
21 # +------------+
23 # A: a.txt<1.1> b.txt<1.2>
24 # B: a.txt<1.2> b.txt<1.1>
26 TEST=AB-loop
27 D=$WC/$TEST
29 mkdir $D
30 cvs add $D
32 echo "1.1" >$D/a.txt
33 cvs add $D/a.txt
34 cvs commit -m "$TEST-A" $D/a.txt
36 echo "1.2" >$D/a.txt
37 cvs commit -m "$TEST-B" $D/a.txt
39 echo "1.1" >$D/b.txt
40 cvs add $D/b.txt
41 cvs commit -m "$TEST-B" $D/b.txt
43 echo "1.2" >$D/b.txt
44 cvs commit -m "$TEST-A" $D/b.txt
47 # +-> A -> B -> C --+
48 # | |
49 # +-----------------+
51 # A: a.txt<1.1> c.txt<1.2>
52 # B: a.txt<1.2> b.txt<1.1>
53 # C: b.txt<1.2> c.txt<1.1>
55 TEST=ABC-loop
56 D=$WC/$TEST
58 mkdir $D
59 cvs add $D
61 echo "1.1" >$D/a.txt
62 cvs add $D/a.txt
63 cvs commit -m "$TEST-A" $D/a.txt
65 echo "1.2" >$D/a.txt
66 cvs commit -m "$TEST-B" $D/a.txt
68 echo "1.1" >$D/b.txt
69 cvs add $D/b.txt
70 cvs commit -m "$TEST-B" $D/b.txt
72 echo "1.2" >$D/b.txt
73 cvs commit -m "$TEST-C" $D/b.txt
75 echo "1.1" >$D/c.txt
76 cvs add $D/c.txt
77 cvs commit -m "$TEST-C" $D/c.txt
79 echo "1.2" >$D/c.txt
80 cvs commit -m "$TEST-A" $D/c.txt
83 # A: a.txt<1.1> b.txt<1.3> c.txt<1.2>
84 # B: a.txt<1.2> b.txt<1.1> c.txt<1.3>
85 # C: a.txt<1.3> b.txt<1.2> c.txt<1.1>
87 TEST=ABC-passthru-loop
88 D=$WC/$TEST
90 mkdir $D
91 cvs add $D
93 echo "1.1" >$D/a.txt
94 cvs add $D/a.txt
95 cvs commit -m "$TEST-A" $D/a.txt
97 echo "1.2" >$D/a.txt
98 cvs commit -m "$TEST-B" $D/a.txt
100 echo "1.3" >$D/a.txt
101 cvs commit -m "$TEST-C" $D/a.txt
103 echo "1.1" >$D/b.txt
104 cvs add $D/b.txt
105 cvs commit -m "$TEST-B" $D/b.txt
107 echo "1.2" >$D/b.txt
108 cvs commit -m "$TEST-C" $D/b.txt
110 echo "1.3" >$D/b.txt
111 cvs commit -m "$TEST-A" $D/b.txt
113 echo "1.1" >$D/c.txt
114 cvs add $D/c.txt
115 cvs commit -m "$TEST-C" $D/c.txt
117 echo "1.2" >$D/c.txt
118 cvs commit -m "$TEST-A" $D/c.txt
120 echo "1.3" >$D/c.txt
121 cvs commit -m "$TEST-B" $D/c.txt
124 # A: a.txt<1.1> c.txt<1.3> d.txt<1.2>
125 # B: a.txt<1.2> b.txt<1.1> d.txt<1.3>
126 # C: a.txt<1.3> b.txt<1.2> c.txt<1.1>
127 # D: b.txt<1.3> c.txt<1.2> d.txt<1.1>
129 TEST=ABCD-passthru-loop
130 D=$WC/$TEST
132 mkdir $D
133 cvs add $D
135 echo "1.1" >$D/a.txt
136 cvs add $D/a.txt
137 cvs commit -m "$TEST-A" $D/a.txt
139 echo "1.2" >$D/a.txt
140 cvs commit -m "$TEST-B" $D/a.txt
142 echo "1.3" >$D/a.txt
143 cvs commit -m "$TEST-C" $D/a.txt
145 echo "1.1" >$D/b.txt
146 cvs add $D/b.txt
147 cvs commit -m "$TEST-B" $D/b.txt
149 echo "1.2" >$D/b.txt
150 cvs commit -m "$TEST-C" $D/b.txt
152 echo "1.3" >$D/b.txt
153 cvs commit -m "$TEST-D" $D/b.txt
155 echo "1.1" >$D/c.txt
156 cvs add $D/c.txt
157 cvs commit -m "$TEST-C" $D/c.txt
159 echo "1.2" >$D/c.txt
160 cvs commit -m "$TEST-D" $D/c.txt
162 echo "1.3" >$D/c.txt
163 cvs commit -m "$TEST-A" $D/c.txt
165 echo "1.1" >$D/d.txt
166 cvs add $D/d.txt
167 cvs commit -m "$TEST-D" $D/d.txt
169 echo "1.2" >$D/d.txt
170 cvs commit -m "$TEST-A" $D/d.txt
172 echo "1.3" >$D/d.txt
173 cvs commit -m "$TEST-B" $D/d.txt
176 # The following test has the nasty property that each changeset has
177 # either one LINK_PREV or LINK_SUCC and also one LINK_PASSTHRU.
179 # A: a.txt<1.1> b.txt<1.3>
180 # B: a.txt<1.2> b.txt<1.4>
181 # C: a.txt<1.3> b.txt<1.1>
182 # D: a.txt<1.4> b.txt<1.2>
184 TEST=AB-double-passthru-loop
185 D=$WC/$TEST
187 mkdir $D
188 cvs add $D
190 echo "1.1" >$D/a.txt
191 cvs add $D/a.txt
192 cvs commit -m "$TEST-A" $D/a.txt
194 echo "1.2" >$D/a.txt
195 cvs commit -m "$TEST-B" $D/a.txt
197 echo "1.3" >$D/a.txt
198 cvs commit -m "$TEST-C" $D/a.txt
200 echo "1.4" >$D/a.txt
201 cvs commit -m "$TEST-D" $D/a.txt
203 echo "1.1" >$D/b.txt
204 cvs add $D/b.txt
205 cvs commit -m "$TEST-C" $D/b.txt
207 echo "1.2" >$D/b.txt
208 cvs commit -m "$TEST-D" $D/b.txt
210 echo "1.3" >$D/b.txt
211 cvs commit -m "$TEST-A" $D/b.txt
213 echo "1.4" >$D/b.txt
214 cvs commit -m "$TEST-B" $D/b.txt