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):
16 # --*--+-------------------- trunk
18 # +--*--+-------------- branch X
20 # +-------------- branch A
22 # +-------------- branch B
24 # +-------------- branch C
27 # --*--+-------------------- trunk
29 # +--*--+-------------- branch Y
31 # +-------------- branch B
33 # +-------------- branch C
35 # +-------------- branch A
38 # --*--+-------------------- trunk
40 # +--*--+-------------- branch Z
42 # +-------------- branch C
44 # +-------------- branch A
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 ->
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
61 cvs
-d $repo co
-d $wc .
69 cvs add file1 file2 file3
70 cvs commit
-m 'Adding files on trunk' .
85 cvs commit
-m 'Adding revision on first-level branches' .