##// END OF EJS Templates
convert_cvs: add --filemap support
Alexis S. L. Carvalho -
r5381:68743681 default
parent child Browse files
Show More
@@ -266,3 +266,9 b' class convert_cvs(converter_source):'
266
266
267 def gettags(self):
267 def gettags(self):
268 return self.tags
268 return self.tags
269
270 def getchangedfiles(self, rev, i):
271 files = self.files[rev].keys()
272 files.sort()
273 return files
274
@@ -29,11 +29,24 b' cd ..'
29 echo % checkout source directory
29 echo % checkout source directory
30 cvs -q checkout src
30 cvs -q checkout src
31
31
32 echo % commit a new revision changing b/c
33 cd src
34 echo c >> b/c
35 cvs -q commit -mci0 . | grep '<--' |\
36 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
37 cd ..
38
32 echo % convert fresh repo
39 echo % convert fresh repo
33 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
40 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
34 cat src-hg/a
41 cat src-hg/a
35 cat src-hg/b/c
42 cat src-hg/b/c
36
43
44 echo % convert fresh repo with --filemap
45 echo include b/c > filemap
46 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
47 cat src-hg/b/c
48 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
49
37 echo % commit new file revisions
50 echo % commit new file revisions
38 cd src
51 cd src
39 echo a >> a
52 echo a >> a
@@ -47,5 +60,8 b" hg convert src src-hg | sed -e 's/connec"
47 cat src-hg/a
60 cat src-hg/a
48 cat src-hg/b/c
61 cat src-hg/b/c
49
62
63 echo % convert again with --filemap
64 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
65 cat src-hg/b/c
66 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
50
67
51
@@ -9,17 +9,37 b' No conflicts created by this import'
9 % checkout source directory
9 % checkout source directory
10 U src/a
10 U src/a
11 U src/b/c
11 U src/b/c
12 % commit a new revision changing b/c
13 checking in src/b/c,v
12 % convert fresh repo
14 % convert fresh repo
13 initializing destination src-hg repository
15 initializing destination src-hg repository
14 connecting to cvsrepo
16 connecting to cvsrepo
15 scanning source...
17 scanning source...
16 sorting...
18 sorting...
17 converting...
19 converting...
18 1 Initial revision
20 2 Initial revision
19 0 import
21 1 import
22 0 ci0
20 updating tags
23 updating tags
21 a
24 a
22 c
25 c
26 c
27 % convert fresh repo with --filemap
28 initializing destination src-filemap repository
29 connecting to cvsrepo
30 scanning source...
31 sorting...
32 converting...
33 2 Initial revision
34 1 import
35 rolling back last transaction
36 0 ci0
37 updating tags
38 c
39 c
40 2 update tags files: .hgtags
41 1 ci0 files: b/c
42 0 Initial revision files: b/c
23 % commit new file revisions
43 % commit new file revisions
24 checking in src/a,v
44 checking in src/a,v
25 checking in src/b/c,v
45 checking in src/b/c,v
@@ -30,8 +50,22 b' scanning source...'
30 sorting...
50 sorting...
31 converting...
51 converting...
32 0 ci1
52 0 ci1
33 updating tags
34 a
53 a
35 a
54 a
36 c
55 c
37 c
56 c
57 c
58 % convert again with --filemap
59 destination src-filemap is a Mercurial repository
60 connecting to cvsrepo
61 scanning source...
62 sorting...
63 converting...
64 0 ci1
65 c
66 c
67 c
68 3 ci1 files: b/c
69 2 update tags files: .hgtags
70 1 ci0 files: b/c
71 0 Initial revision files: b/c
General Comments 0
You need to be logged in to leave comments. Login now