Inline temporary.
[cvs2svn.git] / test-data / preferred-parent-cycle-cvsrepos / makerepo.sh
blob98c34b28a7d19574e7f94bfb6bd0c43a8c942d82
1 #! /bin/sh
3 # This is the script used to create the preferred-parent-cycle CVS
4 # repository. (The repository is checked into svn; this script is
5 # only here for its documentation value.)
7 # The script should be started from the main cvs2svn directory.
9 # The branching structure of the three files in this repository is
10 # constructed to create a loop in the preferred parent of each branch
11 # A, B, and C. The branches are as follows ('*' marks revisions,
12 # which are used to prevent trunk from being a possible parent of
13 # branches A, B, or C):
15 # file1:
16 # --*--+-------------------- trunk
17 # |
18 # +--*--+-------------- branch X
19 # |
20 # +-------------- branch A
21 # |
22 # +-------------- branch B
23 # |
24 # +-------------- branch C
26 # file2:
27 # --*--+-------------------- trunk
28 # |
29 # +--*--+-------------- branch Y
30 # |
31 # +-------------- branch B
32 # |
33 # +-------------- branch C
34 # |
35 # +-------------- branch A
37 # file3:
38 # --*--+-------------------- trunk
39 # |
40 # +--*--+-------------- branch Z
41 # |
42 # +-------------- branch C
43 # |
44 # +-------------- branch A
45 # |
46 # +-------------- branch B
49 # Note that the possible parents of A are (X, Y, Z, C*2, B*1), those
50 # of B are (X, Y, Z, A*2, C*1), and those of C are (X, Y, Z, B*2,
51 # A*1). Therefore the preferred parents form a cycle A -> C -> B ->
52 # A.
54 repo=`pwd`/test-data/preferred-parent-cycle-cvsrepos
55 wc=`pwd`/cvs2svn-tmp/preferred-parent-cycle-wc
56 [ -e $repo/CVSROOT ] && rm -rf $repo/CVSROOT
57 [ -e $repo/dir ] && rm -rf $repo/dir
58 [ -e $wc ] && rm -rf $wc
60 cvs -d $repo init
61 cvs -d $repo co -d $wc .
62 cd $wc
63 mkdir dir
64 cvs add dir
65 cd dir
66 echo '1.1' >file1
67 echo '1.1' >file2
68 echo '1.1' >file3
69 cvs add file1 file2 file3
70 cvs commit -m 'Adding files on trunk' .
73 cvs tag -b X file1
74 cvs up -r X file1
76 cvs tag -b Y file2
77 cvs up -r Y file2
79 cvs tag -b Z file3
80 cvs up -r Z file3
82 echo '1.1.2.1' >file1
83 echo '1.1.2.1' >file2
84 echo '1.1.2.1' >file3
85 cvs commit -m 'Adding revision on first-level branches' .
88 cvs tag -b A file1
89 cvs up -r A file1
91 cvs tag -b B file1
92 cvs up -r B file1
94 cvs tag -b C file1
95 cvs up -r C file1
98 cvs tag -b B file2
99 cvs up -r B file2
101 cvs tag -b C file2
102 cvs up -r C file2
104 cvs tag -b A file2
105 cvs up -r A file2
108 cvs tag -b C file3
109 cvs up -r C file3
111 cvs tag -b A file3
112 cvs up -r A file3
114 cvs tag -b B file3
115 cvs up -r B file3