Log commands (at DEBUG level) before running them.
[cvs2svn.git] / test-data / symbol-mess-cvsrepos / makerepo.sh
blobd66bc58893cb6bee257d3535ae5e699ddbcedf54
1 #! /bin/sh
3 # This is the script used to create the symbol-mess CVS repository.
4 # (The repository is checked into svn; this script is only here for
5 # its documentation value.)
7 # The script should be started from the main cvs2svn directory.
9 repo=`pwd`/test-data/symbol-mess-cvsrepos
10 wc=`pwd`/cvs2svn-tmp/symbol-mess-wc
11 [ -e $repo/CVSROOT ] && rm -rf $repo/CVSROOT
12 [ -e $repo/dir ] && rm -rf $repo/dir
13 [ -e $wc ] && rm -rf $wc
15 cvs -d $repo init
16 cvs -d $repo co -d $wc .
17 cd $wc
18 mkdir dir
19 cvs add dir
20 echo 'line1' >dir/file1
21 echo 'line1' >dir/file2
22 echo 'line1' >dir/file3
23 cvs add dir/file1 dir/file2 dir/file3
24 cvs commit -m 'Adding files on trunk' dir
26 cd dir
28 # One plain old garden-variety tag and one branch:
29 cvs tag TAG
30 cvs tag -b BRANCH
32 # A branch with a commit on it:
33 cvs tag -b BRANCH_WITH_COMMIT
34 cvs up -r BRANCH_WITH_COMMIT
35 echo 'line2' >>file1
36 cvs commit -m 'Commit on branch BRANCH_WITH_COMMIT' file1
37 cvs up -A
39 # Make some symbols for testing majority rule strategy:
40 cvs tag MOSTLY_TAG file1 file2
41 cvs tag -b MOSTLY_TAG file3
43 cvs tag -b MOSTLY_BRANCH file1 file2
44 cvs tag MOSTLY_BRANCH file3
46 # A branch that is blocked by another branch (but with no commits):
47 cvs tag -b BLOCKED_BY_BRANCH file1 file2 file3
48 cvs up -r BLOCKED_BY_BRANCH
49 echo 'line2' >>file1
50 cvs commit -m 'Establish branch BLOCKED_BY_BRANCH' file1
51 cvs tag -b BLOCKING_BRANCH
52 cvs up -A
54 # A branch that is blocked by another branch with a commit:
55 cvs tag -b BLOCKED_BY_COMMIT file1 file2 file3
56 cvs up -r BLOCKED_BY_COMMIT
57 echo 'line2' >>file1
58 cvs commit -m 'Establish branch BLOCKED_BY_COMMIT' file1
59 cvs tag -b BLOCKING_COMMIT
60 cvs up -r BLOCKING_COMMIT
61 echo 'line3' >>file1
62 cvs commit -m 'Committing blocking commit on BLOCKING_COMMIT' file1
63 cvs up -A
65 # A branch that is blocked by an unnamed branch with a commit:
66 cvs tag -b BLOCKED_BY_UNNAMED file1 file2 file3
67 cvs up -r BLOCKED_BY_UNNAMED
68 echo 'line2' >>file1
69 cvs commit -m 'Establish branch BLOCKED_BY_UNNAMED' file1
70 cvs tag -b TEMP
71 cvs up -r TEMP
72 echo 'line3' >>file1
73 cvs commit -m 'Committing blocking commit on TEMP' file1
74 cvs up -A
75 # Now delete the name from the blocking branch.
76 cvs tag -d -B TEMP