annotate tests/test-convert-svn-source @ 6327:6d952dc2abc9

dirstate: refactor granularity code, add a test - rename option dirstate.granularity - move option reading into .write() - add a simple test
author Matt Mackall <mpm@selenic.com>
date Thu, 20 Mar 2008 13:53:59 -0500
parents 851402e53337
children 635c57cf0de8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5255
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
1 #!/bin/sh
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
2
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
3 "$TESTDIR/hghave" svn svn-bindings || exit 80
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
4
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
5 fix_path()
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
6 {
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
7 tr '\\' /
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
8 }
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
9
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
10 echo "[extensions]" >> $HGRCPATH
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
11 echo "convert = " >> $HGRCPATH
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
12
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
13 svnadmin create svn-repo
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
14
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
15 echo % initial svn import
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
16 mkdir t
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
17 cd t
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
18 echo a > a
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
19 cd ..
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
20
5275
4287590a63af Fix \ inside ` problem in test-convert-svn (avoids code duplication, too)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5255
diff changeset
21 svnpath=`pwd | fix_path`
5255
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
22 # SVN wants all paths to start with a slash. Unfortunately,
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
23 # Windows ones don't. Handle that.
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
24 expr $svnpath : "\/" > /dev/null
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
25 if [ $? -ne 0 ]; then
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
26 svnpath='/'$svnpath
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
27 fi
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
28
5804
de8311f7a31b test-convert-svn-source: test convert/multiple extra fields
Patrick Mezard <pmezard@gmail.com>
parents: 5782
diff changeset
29 svnurl=file://$svnpath/svn-repo/trunk/test
5255
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
30 svn import -m init t $svnurl | fix_path
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
31
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
32 echo % update svn repository
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
33 svn co $svnurl t2 | fix_path
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
34 cd t2
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
35 echo b >> a
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
36 echo b > b
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
37 svn add b
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
38 svn ci -m changea
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
39 cd ..
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
40
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
41 echo % convert to hg once
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
42 hg convert $svnurl
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
43
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
44 echo % update svn repository again
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
45 cd t2
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
46 echo c >> a
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
47 echo c >> b
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
48 svn ci -m changeb
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
49 cd ..
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
50
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
51 echo % test incremental conversion
5954
851402e53337 convert: display source revision id with --verbose
Patrick Mezard <pmezard@gmail.com>
parents: 5913
diff changeset
52 hg convert -v $svnurl | sed 's/source:.*/source:/'
5255
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
53
5382
d7d395fb7cd5 convert_svn: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5275
diff changeset
54 echo % test filemap
d7d395fb7cd5 convert_svn: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5275
diff changeset
55 echo 'include b' > filemap
d7d395fb7cd5 convert_svn: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5275
diff changeset
56 hg convert --filemap filemap $svnurl fmap
d7d395fb7cd5 convert_svn: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5275
diff changeset
57 echo '[extensions]' >> $HGRCPATH
d7d395fb7cd5 convert_svn: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5275
diff changeset
58 echo 'hgext.graphlog =' >> $HGRCPATH
d7d395fb7cd5 convert_svn: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5275
diff changeset
59 hg glog -R fmap --template '#rev# #desc|firstline# files: #files#\n'
d7d395fb7cd5 convert_svn: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5275
diff changeset
60
5782
7eb1146b72ec test-convert-svn-source: test stop revision
Patrick Mezard <pmezard@gmail.com>
parents: 5513
diff changeset
61 echo % test stop revision
7eb1146b72ec test-convert-svn-source: test stop revision
Patrick Mezard <pmezard@gmail.com>
parents: 5513
diff changeset
62 hg convert --rev 1 $svnurl stoprev
5804
de8311f7a31b test-convert-svn-source: test convert/multiple extra fields
Patrick Mezard <pmezard@gmail.com>
parents: 5782
diff changeset
63 # Check convert_revision extra-records.
de8311f7a31b test-convert-svn-source: test convert/multiple extra fields
Patrick Mezard <pmezard@gmail.com>
parents: 5782
diff changeset
64 # This is also the only place testing more than one extra field
de8311f7a31b test-convert-svn-source: test convert/multiple extra fields
Patrick Mezard <pmezard@gmail.com>
parents: 5782
diff changeset
65 # in a revision.
de8311f7a31b test-convert-svn-source: test convert/multiple extra fields
Patrick Mezard <pmezard@gmail.com>
parents: 5782
diff changeset
66 hg --cwd stoprev tip --debug | grep extra | sed 's/=.*/=/'
5782
7eb1146b72ec test-convert-svn-source: test stop revision
Patrick Mezard <pmezard@gmail.com>
parents: 5513
diff changeset
67
5462
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
68 ########################################
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
69
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
70 echo "# now tests that it works with trunk/branches/tags layout"
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
71 echo
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
72 echo % initial svn import
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
73 mkdir projA
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
74 cd projA
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
75 mkdir trunk
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
76 mkdir branches
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
77 mkdir tags
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
78 cd ..
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
79
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
80 svnurl=file://$svnpath/svn-repo/projA
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
81 svn import -m "init projA" projA $svnurl | fix_path
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
82
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
83
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
84 echo % update svn repository
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
85 svn co $svnurl/trunk A | fix_path
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
86 cd A
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
87 echo hello > letter.txt
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
88 svn add letter.txt
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
89 svn ci -m hello
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
90
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
91 echo world >> letter.txt
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
92 svn ci -m world
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
93
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
94 svn copy -m "tag v0.1" $svnurl/trunk $svnurl/tags/v0.1
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
95
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
96 echo 'nice day today!' >> letter.txt
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
97 svn ci -m "nice day"
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
98 cd ..
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
99
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
100 echo % convert to hg once
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
101 hg convert $svnurl A-hg
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
102
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
103 echo % update svn repository again
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
104 cd A
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
105 echo "see second letter" >> letter.txt
5883
a893610f6f0c convert: enforce svn_source.getchanges() files unicity
Patrick Mezard <pmezard@gmail.com>
parents: 5462
diff changeset
106 # Put it in a subdirectory to test duplicate file records
a893610f6f0c convert: enforce svn_source.getchanges() files unicity
Patrick Mezard <pmezard@gmail.com>
parents: 5462
diff changeset
107 # from svn source (issue 714)
a893610f6f0c convert: enforce svn_source.getchanges() files unicity
Patrick Mezard <pmezard@gmail.com>
parents: 5462
diff changeset
108 mkdir todo
a893610f6f0c convert: enforce svn_source.getchanges() files unicity
Patrick Mezard <pmezard@gmail.com>
parents: 5462
diff changeset
109 echo "nice to meet you" > todo/letter2.txt
a893610f6f0c convert: enforce svn_source.getchanges() files unicity
Patrick Mezard <pmezard@gmail.com>
parents: 5462
diff changeset
110 svn add todo
5462
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
111 svn ci -m "second letter"
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
112
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
113 svn copy -m "tag v0.2" $svnurl/trunk $svnurl/tags/v0.2
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
114
5883
a893610f6f0c convert: enforce svn_source.getchanges() files unicity
Patrick Mezard <pmezard@gmail.com>
parents: 5462
diff changeset
115 echo "blah-blah-blah" >> todo/letter2.txt
5462
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
116 svn ci -m "work in progress"
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
117 cd ..
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
118
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
119 echo % test incremental conversion
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
120 hg convert $svnurl A-hg
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
121
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
122 cd A-hg
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
123 hg glog --template '#rev# #desc|firstline# files: #files#\n'
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
124 hg tags -q
91a522a69c13 convert: svn -- fix tags handling
Kirill Smelkov <kirr@landau.phys.spbu.ru>
parents: 5382
diff changeset
125 cd ..
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
126
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
127 ########################################
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
128
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
129 echo "# now tests that it works with trunk/tags layout, but no branches yet"
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
130 echo
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
131 echo % initial svn import
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
132 mkdir projB
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
133 cd projB
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
134 mkdir trunk
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
135 mkdir tags
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
136 cd ..
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
137
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
138 svnurl=file://$svnpath/svn-repo/projB
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
139 svn import -m "init projB" projB $svnurl | fix_path
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
140
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
141
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
142 echo % update svn repository
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
143 svn co $svnurl/trunk B | fix_path
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
144 cd B
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
145 echo hello > letter.txt
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
146 svn add letter.txt
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
147 svn ci -m hello
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
148
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
149 echo world >> letter.txt
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
150 svn ci -m world
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
151
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
152 svn copy -m "tag v0.1" $svnurl/trunk $svnurl/tags/v0.1
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
153
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
154 echo 'nice day today!' >> letter.txt
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
155 svn ci -m "nice day"
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
156 cd ..
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
157
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
158 echo % convert to hg once
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
159 hg convert $svnurl B-hg
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
160
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
161 echo % update svn repository again
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
162 cd B
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
163 echo "see second letter" >> letter.txt
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
164 echo "nice to meet you" > letter2.txt
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
165 svn add letter2.txt
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
166 svn ci -m "second letter"
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
167
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
168 svn copy -m "tag v0.2" $svnurl/trunk $svnurl/tags/v0.2
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
169
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
170 echo "blah-blah-blah" >> letter2.txt
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
171 svn ci -m "work in progress"
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
172 cd ..
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
173
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
174 echo % test incremental conversion
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
175 hg convert $svnurl B-hg
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
176
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
177 cd B-hg
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
178 hg glog --template '#rev# #desc|firstline# files: #files#\n'
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
179 hg tags -q
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
180 cd ..