3 # mailer-init.sh: create and initialize a repository for the mailer tests
5 # USAGE: ./mailer-init.sh
9 scripts
="`cd $scripts && pwd`"
11 d
=$scripts/mailer-init.$$
14 echo "test directory is: $d"
17 svn co
file://`pwd`/repos
wc
20 # create a bunch of dirs and files
24 echo file3
> dir
1/file3
25 echo file4
> dir
1/file4
26 echo file5
> dir
2/file5
27 echo file6
> dir
2/file6
29 svn commit
-m "initial load"
31 # make some changes and set some properties
32 svn ps prop1 propval1 file1
33 echo change C1
>> file2
34 svn ps svn
:keywords Id file2
35 svn ps svn
:new_svn_prop val file2
36 svn ps prop1 propval1 file2
37 svn ps prop3 propval3 dir1
38 echo change C2
>> dir
2/file5
39 svn commit
-m "two file changes"
41 # copy a file and a dir and change property
42 svn
cp file1 dir
2/file7
44 svn ps prop3 propval4 dir3
45 svn commit
-m "two copies"
47 # copy and modify a file
48 svn
cp file1 dir
3/file8
49 echo change C3
>> dir
3/file8
50 svn commit
-m "copied and changed"
52 # change and delete properties
53 svn ps svn
:keywords Date file2
54 svn ps prop2 propval2 file2
56 svn pd svn
:new_svn_prop file2
57 svn ps prop3 propval4 dir1
59 svn up
# make sure our dirs are up to date
60 svn commit
-m "changes and deletes of properties"
62 # add a file, add a dir, and make a change
66 echo change C4
>> dir
1/file3
67 svn commit
-m "mixed addition and change"
69 # add a file, add a dir, delete a file, delete a dir, and make a change
70 echo file10
> dir
1/file10
74 echo change C5
>> dir
3/file3
75 svn up
# make sure our dirs are up to date
76 svn commit
-m "adds, deletes, and a change"
78 # copy a dir and change a file in it
80 echo change C6
>> dir
6/file4
81 svn commit
-m "copy dir, then make a change"
83 # add a binary file and set property to binary value
84 echo -e "\x00\x01\x02\x03\x04" > file11
86 svn ps prop2
-F file11 file9
87 svn commit
-m "add binary file"
89 # change the binary file and set property to non binary value
90 echo -e "\x20\x01\x02\x20" > file11
91 svn ps prop2 propval2 file9
92 svn commit
-m "change binary file"
94 # tweak the commit dates to known quantities
95 $scripts/mailer-tweak.py ..
/repos