Show More
@@ -1,106 +1,107 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | "$TESTDIR/hghave" svn || exit 80 |
|
4 | 4 | |
|
5 | 5 | fix_path() |
|
6 | 6 | { |
|
7 | 7 | tr '\\' / |
|
8 | 8 | } |
|
9 | 9 | |
|
10 | 10 | escapedwd=`pwd | fix_path` |
|
11 | 11 | # SVN wants all paths to start with a slash. Unfortunately, |
|
12 | 12 | # Windows ones don't. Handle that. |
|
13 | 13 | expr $escapedwd : "\/" > /dev/null |
|
14 | 14 | if [ $? -ne 0 ]; then |
|
15 | 15 | escapedwd='/'$escapedwd |
|
16 | 16 | fi |
|
17 | 17 | filterpath="sed s|$escapedwd|/root|" |
|
18 | filtersvn='s/ in transaction.*/ is out of date/;s/Out of date: /File /' | |
|
18 | 19 | |
|
19 | 20 | echo % create subversion repo |
|
20 | 21 | |
|
21 | 22 | SVNREPO="file://$escapedwd/svn-repo" |
|
22 | 23 | WCROOT="`pwd`/svn-wc" |
|
23 | 24 | svnadmin create svn-repo |
|
24 | 25 | svn co $SVNREPO svn-wc |
|
25 | 26 | cd svn-wc |
|
26 | 27 | mkdir src |
|
27 | 28 | echo alpha > src/alpha |
|
28 | 29 | svn add src |
|
29 | 30 | mkdir externals |
|
30 | 31 | echo other > externals/other |
|
31 | 32 | svn add externals |
|
32 | 33 | svn ci -m 'Add alpha' |
|
33 | 34 | svn up |
|
34 | 35 | cat > extdef <<EOF |
|
35 | 36 | externals -r1 $SVNREPO/externals |
|
36 | 37 | EOF |
|
37 | 38 | svn propset -F extdef svn:externals src |
|
38 | 39 | svn ci -m 'Setting externals' |
|
39 | 40 | cd .. |
|
40 | 41 | |
|
41 | 42 | echo % create hg repo |
|
42 | 43 | mkdir sub |
|
43 | 44 | cd sub |
|
44 | 45 | hg init t |
|
45 | 46 | cd t |
|
46 | 47 | |
|
47 | 48 | echo % first revision, no sub |
|
48 | 49 | echo a > a |
|
49 | 50 | hg ci -Am0 |
|
50 | 51 | |
|
51 | 52 | echo % add first svn sub |
|
52 | 53 | echo "s = [svn]$SVNREPO/src" >> .hgsub |
|
53 | 54 | svn co --quiet $SVNREPO/src s |
|
54 | 55 | hg add .hgsub |
|
55 | 56 | hg ci -m1 |
|
56 | 57 | echo % debugsub |
|
57 | 58 | hg debugsub | $filterpath |
|
58 | 59 | |
|
59 | 60 | echo |
|
60 | 61 | echo % change file in svn and hg, commit |
|
61 | 62 | echo a >> a |
|
62 | 63 | echo alpha >> s/alpha |
|
63 | 64 | hg commit -m 'Message!' |
|
64 | 65 | hg debugsub | $filterpath |
|
65 | 66 | |
|
66 | 67 | echo |
|
67 | 68 | echo a > s/a |
|
68 | 69 | echo % should be empty despite change to s/a |
|
69 | 70 | hg st |
|
70 | 71 | |
|
71 | 72 | echo |
|
72 | 73 | echo % add a commit from svn |
|
73 | 74 | cd "$WCROOT"/src |
|
74 | 75 | svn up |
|
75 | 76 | echo xyz >> alpha |
|
76 | 77 | svn propset svn:mime-type 'text/xml' alpha |
|
77 | 78 | svn ci -m 'amend a from svn' |
|
78 | 79 | cd ../../sub/t |
|
79 | 80 | |
|
80 | 81 | echo % this commit from hg will fail |
|
81 | 82 | echo zzz >> s/alpha |
|
82 | hg ci -m 'amend alpha from hg' | |
|
83 | hg ci -m 'amend alpha from hg' 2>&1 | sed "$filtersvn" | |
|
83 | 84 | svn revert -q s/alpha |
|
84 | 85 | |
|
85 | 86 | echo % this commit fails because of meta changes |
|
86 | 87 | svn propset svn:mime-type 'text/html' s/alpha |
|
87 | hg ci -m 'amend alpha from hg' | |
|
88 | hg ci -m 'amend alpha from hg' 2>&1 | sed "$filtersvn" | |
|
88 | 89 | svn revert -q s/alpha |
|
89 | 90 | |
|
90 | 91 | echo % this commit fails because of externals changes |
|
91 | 92 | echo zzz > s/externals/other |
|
92 | 93 | hg ci -m 'amend externals from hg' |
|
93 | 94 | svn revert -q s/externals/other |
|
94 | 95 | |
|
95 | 96 | echo % this commit fails because of externals meta changes |
|
96 | 97 | svn propset svn:mime-type 'text/html' s/externals/other |
|
97 | 98 | hg ci -m 'amend externals from hg' |
|
98 | 99 | svn revert -q s/externals/other |
|
99 | 100 | |
|
100 | 101 | echo |
|
101 | 102 | echo % clone |
|
102 | 103 | cd .. |
|
103 | 104 | hg clone t tc | fix_path |
|
104 | 105 | cd tc |
|
105 | 106 | echo % debugsub in clone |
|
106 | 107 | hg debugsub | $filterpath |
General Comments 0
You need to be logged in to leave comments.
Login now