Show More
@@ -0,0 +1,89 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | "$TESTDIR/hghave" svn svn-bindings || exit 80 | |||
|
4 | ||||
|
5 | fix_path() | |||
|
6 | { | |||
|
7 | tr '\\' / | |||
|
8 | } | |||
|
9 | ||||
|
10 | echo "[extensions]" >> $HGRCPATH | |||
|
11 | echo "convert = " >> $HGRCPATH | |||
|
12 | echo "hgext.graphlog =" >> $HGRCPATH | |||
|
13 | ||||
|
14 | svnadmin create svn-repo | |||
|
15 | ||||
|
16 | svnpath=`pwd | fix_path` | |||
|
17 | # SVN wants all paths to start with a slash. Unfortunately, | |||
|
18 | # Windows ones don't. Handle that. | |||
|
19 | expr $svnpath : "\/" > /dev/null | |||
|
20 | if [ $? -ne 0 ]; then | |||
|
21 | svnpath='/'$svnpath | |||
|
22 | fi | |||
|
23 | ||||
|
24 | echo % initial svn import | |||
|
25 | mkdir projA | |||
|
26 | cd projA | |||
|
27 | mkdir trunk | |||
|
28 | mkdir branches | |||
|
29 | mkdir tags | |||
|
30 | cd .. | |||
|
31 | ||||
|
32 | svnurl=file://$svnpath/svn-repo/projA | |||
|
33 | svn import -m "init projA" projA $svnurl | fix_path | |||
|
34 | ||||
|
35 | echo % update svn repository | |||
|
36 | svn co $svnurl A | fix_path | |||
|
37 | cd A | |||
|
38 | echo hello > trunk/letter.txt | |||
|
39 | echo hey > trunk/letter2.txt | |||
|
40 | echo ho > trunk/letter3.txt | |||
|
41 | svn add trunk/letter.txt trunk/letter2.txt trunk/letter3.txt | |||
|
42 | svn ci -m hello | |||
|
43 | ||||
|
44 | echo % branch to old letters | |||
|
45 | svn copy trunk branches/old | |||
|
46 | svn rm branches/old/letter3.txt | |||
|
47 | svn ci -m "branch trunk, remove letter3" | |||
|
48 | svn up | |||
|
49 | ||||
|
50 | echo % update trunk | |||
|
51 | echo "what can I say ?" >> trunk/letter.txt | |||
|
52 | svn ci -m "change letter" | |||
|
53 | ||||
|
54 | echo % update old branch | |||
|
55 | echo "what's up ?" >> branches/old/letter2.txt | |||
|
56 | svn ci -m "change letter2" | |||
|
57 | ||||
|
58 | echo % create a cross-branch revision | |||
|
59 | svn move -m "move letter2" trunk/letter2.txt \ | |||
|
60 | branches/old/letter3.txt | |||
|
61 | echo "I am fine" >> branches/old/letter3.txt | |||
|
62 | svn ci -m "move and update letter3.txt" | |||
|
63 | ||||
|
64 | echo % update old branch again | |||
|
65 | echo "bye" >> branches/old/letter2.txt | |||
|
66 | svn ci -m "change letter2 again" | |||
|
67 | ||||
|
68 | echo % update trunk again | |||
|
69 | echo "how are you ?" >> trunk/letter.txt | |||
|
70 | svn ci -m "last change to letter" | |||
|
71 | cd .. | |||
|
72 | ||||
|
73 | echo % convert trunk and branches | |||
|
74 | hg convert --datesort $svnurl A-hg | |||
|
75 | ||||
|
76 | echo % branch again from a converted revision | |||
|
77 | cd A | |||
|
78 | svn copy -r 1 $svnurl/trunk branches/old2 | |||
|
79 | svn ci -m "branch trunk@1 into old2" | |||
|
80 | cd .. | |||
|
81 | ||||
|
82 | echo % convert again | |||
|
83 | hg convert --datesort $svnurl A-hg | |||
|
84 | ||||
|
85 | cd A-hg | |||
|
86 | hg glog --template '#rev# #desc|firstline# files: #files#\n' | |||
|
87 | hg branches | sed 's/:.*/:/' | |||
|
88 | hg tags -q | |||
|
89 | cd .. |
@@ -0,0 +1,101 b'' | |||||
|
1 | % initial svn import | |||
|
2 | Adding projA/trunk | |||
|
3 | Adding projA/branches | |||
|
4 | Adding projA/tags | |||
|
5 | ||||
|
6 | Committed revision 1. | |||
|
7 | % update svn repository | |||
|
8 | A A/trunk | |||
|
9 | A A/branches | |||
|
10 | A A/tags | |||
|
11 | Checked out revision 1. | |||
|
12 | A trunk/letter.txt | |||
|
13 | A trunk/letter2.txt | |||
|
14 | A trunk/letter3.txt | |||
|
15 | Adding trunk/letter.txt | |||
|
16 | Adding trunk/letter2.txt | |||
|
17 | Adding trunk/letter3.txt | |||
|
18 | Transmitting file data ... | |||
|
19 | Committed revision 2. | |||
|
20 | % branch to old letters | |||
|
21 | A branches/old | |||
|
22 | D branches/old/letter3.txt | |||
|
23 | Adding branches/old | |||
|
24 | Adding branches/old/letter.txt | |||
|
25 | Adding branches/old/letter2.txt | |||
|
26 | Deleting branches/old/letter3.txt | |||
|
27 | ||||
|
28 | Committed revision 3. | |||
|
29 | At revision 3. | |||
|
30 | % update trunk | |||
|
31 | Sending trunk/letter.txt | |||
|
32 | Transmitting file data . | |||
|
33 | Committed revision 4. | |||
|
34 | % update old branch | |||
|
35 | Sending branches/old/letter2.txt | |||
|
36 | Transmitting file data . | |||
|
37 | Committed revision 5. | |||
|
38 | % create a cross-branch revision | |||
|
39 | A branches/old/letter3.txt | |||
|
40 | D trunk/letter2.txt | |||
|
41 | Adding branches/old/letter3.txt | |||
|
42 | Deleting trunk/letter2.txt | |||
|
43 | Transmitting file data . | |||
|
44 | Committed revision 6. | |||
|
45 | % update old branch again | |||
|
46 | Sending branches/old/letter2.txt | |||
|
47 | Transmitting file data . | |||
|
48 | Committed revision 7. | |||
|
49 | % update trunk again | |||
|
50 | Sending trunk/letter.txt | |||
|
51 | Transmitting file data . | |||
|
52 | Committed revision 8. | |||
|
53 | % convert trunk and branches | |||
|
54 | initializing destination A-hg repository | |||
|
55 | scanning source... | |||
|
56 | sorting... | |||
|
57 | converting... | |||
|
58 | 8 init projA | |||
|
59 | 7 hello | |||
|
60 | 6 branch trunk, remove letter3 | |||
|
61 | 5 change letter | |||
|
62 | 4 change letter2 | |||
|
63 | 3 move and update letter3.txt | |||
|
64 | 2 move and update letter3.txt | |||
|
65 | 1 change letter2 again | |||
|
66 | 0 last change to letter | |||
|
67 | % branch again from a converted revision | |||
|
68 | Checked out revision 1. | |||
|
69 | A branches/old2 | |||
|
70 | Adding branches/old2 | |||
|
71 | ||||
|
72 | Committed revision 9. | |||
|
73 | % convert again | |||
|
74 | scanning source... | |||
|
75 | sorting... | |||
|
76 | converting... | |||
|
77 | 0 branch trunk@1 into old2 | |||
|
78 | o 9 branch trunk@1 into old2 files: | |||
|
79 | | | |||
|
80 | | o 8 last change to letter files: letter.txt | |||
|
81 | | | | |||
|
82 | | | o 7 change letter2 again files: letter2.txt | |||
|
83 | | | | | |||
|
84 | | o | 6 move and update letter3.txt files: letter2.txt | |||
|
85 | | | | | |||
|
86 | | | o 5 move and update letter3.txt files: letter3.txt | |||
|
87 | | | | | |||
|
88 | | | o 4 change letter2 files: letter2.txt | |||
|
89 | | | | | |||
|
90 | | o | 3 change letter files: letter.txt | |||
|
91 | | | | | |||
|
92 | +---o 2 branch trunk, remove letter3 files: letter.txt letter.txt letter2.txt letter2.txt | |||
|
93 | | | | |||
|
94 | | o 1 hello files: letter.txt letter2.txt letter3.txt | |||
|
95 | |/ | |||
|
96 | o 0 init projA files: | |||
|
97 | ||||
|
98 | old2 9: | |||
|
99 | default 8: | |||
|
100 | old 7: | |||
|
101 | tip |
General Comments 0
You need to be logged in to leave comments.
Login now