Show More
@@ -1,118 +1,122 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | "$TESTDIR/hghave" svn svn-bindings || exit 80 |
|
4 | 4 | |
|
5 | 5 | fix_path() |
|
6 | 6 | { |
|
7 | 7 | tr '\\' / |
|
8 | 8 | } |
|
9 | 9 | |
|
10 | 10 | echo "[extensions]" >> $HGRCPATH |
|
11 | 11 | echo "convert = " >> $HGRCPATH |
|
12 | 12 | |
|
13 | 13 | svnadmin create svn-repo |
|
14 | 14 | |
|
15 | 15 | echo % initial svn import |
|
16 | 16 | mkdir t |
|
17 | 17 | cd t |
|
18 | 18 | echo a > a |
|
19 | 19 | cd .. |
|
20 | 20 | |
|
21 | 21 | svnpath=`pwd | fix_path` |
|
22 | 22 | # SVN wants all paths to start with a slash. Unfortunately, |
|
23 | 23 | # Windows ones don't. Handle that. |
|
24 | 24 | expr $svnpath : "\/" > /dev/null |
|
25 | 25 | if [ $? -ne 0 ]; then |
|
26 | 26 | svnpath='/'$svnpath |
|
27 | 27 | fi |
|
28 | 28 | |
|
29 | svnurl=file://$svnpath/svn-repo/trunk | |
|
29 | svnurl=file://$svnpath/svn-repo/trunk/test | |
|
30 | 30 | svn import -m init t $svnurl | fix_path |
|
31 | 31 | |
|
32 | 32 | echo % update svn repository |
|
33 | 33 | svn co $svnurl t2 | fix_path |
|
34 | 34 | cd t2 |
|
35 | 35 | echo b >> a |
|
36 | 36 | echo b > b |
|
37 | 37 | svn add b |
|
38 | 38 | svn ci -m changea |
|
39 | 39 | cd .. |
|
40 | 40 | |
|
41 | 41 | echo % convert to hg once |
|
42 | 42 | hg convert $svnurl |
|
43 | 43 | |
|
44 | 44 | echo % update svn repository again |
|
45 | 45 | cd t2 |
|
46 | 46 | echo c >> a |
|
47 | 47 | echo c >> b |
|
48 | 48 | svn ci -m changeb |
|
49 | 49 | cd .. |
|
50 | 50 | |
|
51 | 51 | echo % test incremental conversion |
|
52 | 52 | hg convert $svnurl |
|
53 | 53 | |
|
54 | 54 | echo % test filemap |
|
55 | 55 | echo 'include b' > filemap |
|
56 | 56 | hg convert --filemap filemap $svnurl fmap |
|
57 | 57 | echo '[extensions]' >> $HGRCPATH |
|
58 | 58 | echo 'hgext.graphlog =' >> $HGRCPATH |
|
59 | 59 | hg glog -R fmap --template '#rev# #desc|firstline# files: #files#\n' |
|
60 | 60 | |
|
61 | 61 | echo % test stop revision |
|
62 | 62 | hg convert --rev 1 $svnurl stoprev |
|
63 | # Check convert_revision extra-records. | |
|
64 | # This is also the only place testing more than one extra field | |
|
65 | # in a revision. | |
|
66 | hg --cwd stoprev tip --debug | grep extra | sed 's/=.*/=/' | |
|
63 | 67 | |
|
64 | 68 | ######################################## |
|
65 | 69 | |
|
66 | 70 | echo "# now tests that it works with trunk/branches/tags layout" |
|
67 | 71 | echo |
|
68 | 72 | echo % initial svn import |
|
69 | 73 | mkdir projA |
|
70 | 74 | cd projA |
|
71 | 75 | mkdir trunk |
|
72 | 76 | mkdir branches |
|
73 | 77 | mkdir tags |
|
74 | 78 | cd .. |
|
75 | 79 | |
|
76 | 80 | svnurl=file://$svnpath/svn-repo/projA |
|
77 | 81 | svn import -m "init projA" projA $svnurl | fix_path |
|
78 | 82 | |
|
79 | 83 | |
|
80 | 84 | echo % update svn repository |
|
81 | 85 | svn co $svnurl/trunk A | fix_path |
|
82 | 86 | cd A |
|
83 | 87 | echo hello > letter.txt |
|
84 | 88 | svn add letter.txt |
|
85 | 89 | svn ci -m hello |
|
86 | 90 | |
|
87 | 91 | echo world >> letter.txt |
|
88 | 92 | svn ci -m world |
|
89 | 93 | |
|
90 | 94 | svn copy -m "tag v0.1" $svnurl/trunk $svnurl/tags/v0.1 |
|
91 | 95 | |
|
92 | 96 | echo 'nice day today!' >> letter.txt |
|
93 | 97 | svn ci -m "nice day" |
|
94 | 98 | cd .. |
|
95 | 99 | |
|
96 | 100 | echo % convert to hg once |
|
97 | 101 | hg convert $svnurl A-hg |
|
98 | 102 | |
|
99 | 103 | echo % update svn repository again |
|
100 | 104 | cd A |
|
101 | 105 | echo "see second letter" >> letter.txt |
|
102 | 106 | echo "nice to meet you" > letter2.txt |
|
103 | 107 | svn add letter2.txt |
|
104 | 108 | svn ci -m "second letter" |
|
105 | 109 | |
|
106 | 110 | svn copy -m "tag v0.2" $svnurl/trunk $svnurl/tags/v0.2 |
|
107 | 111 | |
|
108 | 112 | echo "blah-blah-blah" >> letter2.txt |
|
109 | 113 | svn ci -m "work in progress" |
|
110 | 114 | cd .. |
|
111 | 115 | |
|
112 | 116 | echo % test incremental conversion |
|
113 | 117 | hg convert $svnurl A-hg |
|
114 | 118 | |
|
115 | 119 | cd A-hg |
|
116 | 120 | hg glog --template '#rev# #desc|firstline# files: #files#\n' |
|
117 | 121 | hg tags -q |
|
118 | 122 | cd .. |
@@ -1,118 +1,120 b'' | |||
|
1 | 1 | % initial svn import |
|
2 | 2 | Adding t/a |
|
3 | 3 | |
|
4 | 4 | Committed revision 1. |
|
5 | 5 | % update svn repository |
|
6 | 6 | A t2/a |
|
7 | 7 | Checked out revision 1. |
|
8 | 8 | A b |
|
9 | 9 | Sending a |
|
10 | 10 | Adding b |
|
11 | 11 | Transmitting file data .. |
|
12 | 12 | Committed revision 2. |
|
13 | 13 | % convert to hg once |
|
14 |
assuming destination t |
|
|
15 |
initializing destination t |
|
|
14 | assuming destination test-hg | |
|
15 | initializing destination test-hg repository | |
|
16 | 16 | scanning source... |
|
17 | 17 | sorting... |
|
18 | 18 | converting... |
|
19 | 19 | 1 init |
|
20 | 20 | 0 changea |
|
21 | 21 | % update svn repository again |
|
22 | 22 | Sending a |
|
23 | 23 | Sending b |
|
24 | 24 | Transmitting file data .. |
|
25 | 25 | Committed revision 3. |
|
26 | 26 | % test incremental conversion |
|
27 |
assuming destination t |
|
|
27 | assuming destination test-hg | |
|
28 | 28 | scanning source... |
|
29 | 29 | sorting... |
|
30 | 30 | converting... |
|
31 | 31 | 0 changeb |
|
32 | 32 | % test filemap |
|
33 | 33 | initializing destination fmap repository |
|
34 | 34 | scanning source... |
|
35 | 35 | sorting... |
|
36 | 36 | converting... |
|
37 | 37 | 2 init |
|
38 | 38 | 1 changea |
|
39 | 39 | 0 changeb |
|
40 | 40 | o 1 changeb files: b |
|
41 | 41 | | |
|
42 | 42 | o 0 changea files: b |
|
43 | 43 | |
|
44 | 44 | % test stop revision |
|
45 | 45 | initializing destination stoprev repository |
|
46 | 46 | scanning source... |
|
47 | 47 | sorting... |
|
48 | 48 | converting... |
|
49 | 49 | 0 init |
|
50 | extra: branch= | |
|
51 | extra: convert_revision= | |
|
50 | 52 | # now tests that it works with trunk/branches/tags layout |
|
51 | 53 | |
|
52 | 54 | % initial svn import |
|
53 | 55 | Adding projA/trunk |
|
54 | 56 | Adding projA/branches |
|
55 | 57 | Adding projA/tags |
|
56 | 58 | |
|
57 | 59 | Committed revision 4. |
|
58 | 60 | % update svn repository |
|
59 | 61 | Checked out revision 4. |
|
60 | 62 | A letter.txt |
|
61 | 63 | Adding letter.txt |
|
62 | 64 | Transmitting file data . |
|
63 | 65 | Committed revision 5. |
|
64 | 66 | Sending letter.txt |
|
65 | 67 | Transmitting file data . |
|
66 | 68 | Committed revision 6. |
|
67 | 69 | |
|
68 | 70 | Committed revision 7. |
|
69 | 71 | Sending letter.txt |
|
70 | 72 | Transmitting file data . |
|
71 | 73 | Committed revision 8. |
|
72 | 74 | % convert to hg once |
|
73 | 75 | initializing destination A-hg repository |
|
74 | 76 | scanning source... |
|
75 | 77 | sorting... |
|
76 | 78 | converting... |
|
77 | 79 | 3 init projA |
|
78 | 80 | 2 hello |
|
79 | 81 | 1 world |
|
80 | 82 | 0 nice day |
|
81 | 83 | updating tags |
|
82 | 84 | % update svn repository again |
|
83 | 85 | A letter2.txt |
|
84 | 86 | Sending letter.txt |
|
85 | 87 | Adding letter2.txt |
|
86 | 88 | Transmitting file data .. |
|
87 | 89 | Committed revision 9. |
|
88 | 90 | |
|
89 | 91 | Committed revision 10. |
|
90 | 92 | Sending letter2.txt |
|
91 | 93 | Transmitting file data . |
|
92 | 94 | Committed revision 11. |
|
93 | 95 | % test incremental conversion |
|
94 | 96 | scanning source... |
|
95 | 97 | sorting... |
|
96 | 98 | converting... |
|
97 | 99 | 1 second letter |
|
98 | 100 | 0 work in progress |
|
99 | 101 | updating tags |
|
100 | 102 | o 7 update tags files: .hgtags |
|
101 | 103 | | |
|
102 | 104 | o 6 work in progress files: letter2.txt |
|
103 | 105 | | |
|
104 | 106 | o 5 second letter files: letter.txt letter2.txt |
|
105 | 107 | | |
|
106 | 108 | o 4 update tags files: .hgtags |
|
107 | 109 | | |
|
108 | 110 | o 3 nice day files: letter.txt |
|
109 | 111 | | |
|
110 | 112 | o 2 world files: letter.txt |
|
111 | 113 | | |
|
112 | 114 | o 1 hello files: letter.txt |
|
113 | 115 | | |
|
114 | 116 | o 0 init projA files: |
|
115 | 117 | |
|
116 | 118 | tip |
|
117 | 119 | v0.2 |
|
118 | 120 | v0.1 |
General Comments 0
You need to be logged in to leave comments.
Login now