comparison tests/fixtures/externals.sh @ 174:f80132c5fea5

Convert svn:externals properties into a .hgsvnexternals file
author Patrick Mezard <pmezard@gmail.com>
date Fri, 02 Jan 2009 15:54:05 -0600
parents
children 1c46ad3f56aa
comparison
equal deleted inserted replaced
173:f244eaee5069 174:f80132c5fea5
1 #!/bin/sh
2 #
3 # Generate externals.svndump
4 #
5
6 mkdir temp
7 cd temp
8
9 mkdir project-orig
10 cd project-orig
11 mkdir trunk
12 mkdir branches
13 mkdir externals
14 cd ..
15
16 svnadmin create testrepo
17 svnurl=file://`pwd`/testrepo
18 svn import project-orig $svnurl -m "init project"
19
20 svn co $svnurl project
21 cd project/externals
22 mkdir project1
23 echo a > project1/a
24 svn add project1
25 mkdir project2
26 echo a > project2/b
27 svn add project2
28 svn ci -m "configure externals projects"
29 cd ../trunk
30 # Add an external reference
31 echo a > a
32 svn add a
33 cat > externals <<EOF
34 ../externals/project1 deps/project1
35 EOF
36 svn propset -F externals svn:externals .
37 svn ci -m "set externals on ."
38 # Add another one
39 cat > externals <<EOF
40 ../externals/project1 deps/project1
41 ../externals/project2 deps/project2
42 EOF
43 svn propset -F externals svn:externals .
44 svn ci -m "update externals on ."
45 # Suppress an external and add one on a subdir
46 cat > externals <<EOF
47 ../externals/project2 deps/project2
48 EOF
49 svn propset -F externals svn:externals .
50 mkdir subdir
51 mkdir subdir2
52 svn add subdir subdir2
53 cat > externals <<EOF
54 ../externals/project1 deps/project1
55 EOF
56 svn propset -F externals svn:externals subdir subdir2
57 svn ci -m "add on subdir"
58 # Suppress the subdirectory
59 svn rm subdir
60 svn ci -m 'remove externals subdir'
61 # Remove the property on subdir2
62 svn propdel svn:externals subdir2
63 svn ci -m 'remove externals subdir2'
64 cd ../..
65
66 svnadmin dump testrepo > ../externals.svndump