Add a test of non-ascii contents in a .cvsignore file.
[cvs2svn.git] / test-data / add-on-branch-cvsrepos / makerepo.sh
blobb488a5d1ade16a4624b6f47d86cd7240a8ff678a
1 #! /bin/sh
3 # This is the script used to create the add-on-branch CVS repository.
4 # (The repository is checked into svn; this script is only here for
5 # its documentation value.) The script should be started from the
6 # main cvs2svn directory.
8 # The output of this script depends on the CVS version. Newer CVS
9 # versions add dead revisions (b.txt:1.1.2.1 and c.txt:1.2.2.1) on the
10 # branch, presumably to indicate that the file didn't exist on the
11 # branch during the period of time between the branching point and
12 # when the 1.x.2.2 revisions were committed. Older versions of CVS do
13 # not add these extra revisions. The point of this test is to handle
14 # the new CVS behavior, so set this variable to point at a newish CVS
15 # executable:
17 cvs=$HOME/download/cvs-1.11.21/src/cvs
19 name=add-on-branch
20 repo=`pwd`/test-data/$name-cvsrepos
21 wc=`pwd`/cvs2svn-tmp/$name-wc
22 [ -e $repo/CVSROOT ] && rm -rf $repo/CVSROOT
23 [ -e $repo/proj ] && rm -rf $repo/proj
24 [ -e $wc ] && rm -rf $wc
26 $cvs -d $repo init
27 $cvs -d $repo co -d $wc .
28 cd $wc
29 mkdir proj
30 $cvs add proj
31 cd $wc/proj
33 echo "Create a file a.txt on trunk:"
34 echo '1.1' >a.txt
35 $cvs add a.txt
36 $cvs commit -m 'Adding a.txt:1.1' .
38 echo "Create BRANCH1 on file a.txt:"
39 $cvs tag -b BRANCH1
41 echo "Create BRANCH2 on file a.txt:"
42 $cvs tag -b BRANCH2
44 echo "Create BRANCH3 on file a.txt:"
45 $cvs tag -b BRANCH3
49 f=b.txt
50 b=BRANCH1
52 echo "Add file $f on trunk:"
53 $cvs up -A
54 echo "1.1" >$f
55 $cvs add $f
56 $cvs commit -m "Adding $f:1.1"
59 echo "Add file $f on $b:"
60 $cvs up -r $b
62 # Ensure that times are distinct:
63 sleep 2
64 echo "1.1.2.2" >$f
65 $cvs add $f
66 $cvs commit -m "Adding $f:1.1.2.2"
70 f=c.txt
71 b=BRANCH2
73 echo "Add file $f on trunk:"
74 $cvs up -A
75 echo "1.1" >$f
76 $cvs add $f
77 $cvs commit -m "Adding $f:1.1"
80 echo "Delete file $f on trunk:"
81 rm $f
82 $cvs remove $f
83 $cvs commit -m "Removing $f:1.2"
86 echo "Add file $f on $b:"
87 $cvs up -r $b
89 # Ensure that times are distinct:
90 sleep 2
91 echo "1.2.2.2" >$f
92 $cvs add $f
93 $cvs commit -m "Adding $f:1.2.2.2"
97 f=d.txt
98 b=BRANCH3
100 echo "Add file $f on trunk:"
101 $cvs up -A
102 echo "1.1" >$f
103 $cvs add $f
104 $cvs commit -m "Adding $f:1.1"
107 echo "Add file $f on $b:"
108 $cvs up -r $b
110 # Ensure that times are distinct:
111 sleep 2
112 echo "1.1.2.2" >$f
113 $cvs add $f
114 $cvs commit -m "Adding $f:1.1.2.2"
117 echo "Modify file $f on trunk:"
118 $cvs up -A
119 echo "1.2" >$f
120 $cvs commit -m "Changing $f:1.2"
123 # Erase the unneeded stuff out of CVSROOT:
124 rm -rf $repo/CVSROOT
125 mkdir $repo/CVSROOT