##// END OF EJS Templates
test-convert-cvs*: mute output from "cvs up"...
Mads Kiilerich -
r7812:18048153 default
parent child Browse files
Show More
@@ -1,103 +1,103 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 "$TESTDIR/hghave" cvs cvsps || exit 80
3 "$TESTDIR/hghave" cvs cvsps || exit 80
4
4
5 cvscall()
5 cvscall()
6 {
6 {
7 cvs -f $@
7 cvs -f $@
8 }
8 }
9
9
10 hgcat()
10 hgcat()
11 {
11 {
12 hg --cwd src-hg cat -r tip "$1"
12 hg --cwd src-hg cat -r tip "$1"
13 }
13 }
14
14
15 # Test legacy configuration with external cvsps
15 # Test legacy configuration with external cvsps
16 echo "[extensions]" >> $HGRCPATH
16 echo "[extensions]" >> $HGRCPATH
17 echo "convert = " >> $HGRCPATH
17 echo "convert = " >> $HGRCPATH
18 echo "graphlog = " >> $HGRCPATH
18 echo "graphlog = " >> $HGRCPATH
19 echo "[convert]" >> $HGRCPATH
19 echo "[convert]" >> $HGRCPATH
20 echo "cvsps=cvsps -A -u --cvs-direct -q" >> $HGRCPATH
20 echo "cvsps=cvsps -A -u --cvs-direct -q" >> $HGRCPATH
21
21
22 echo % create cvs repository
22 echo % create cvs repository
23 mkdir cvsrepo
23 mkdir cvsrepo
24 cd cvsrepo
24 cd cvsrepo
25 export CVSROOT=`pwd`
25 export CVSROOT=`pwd`
26 export CVS_OPTIONS=-f
26 export CVS_OPTIONS=-f
27 cd ..
27 cd ..
28
28
29 cvscall -q -d "$CVSROOT" init
29 cvscall -q -d "$CVSROOT" init
30
30
31 echo % create source directory
31 echo % create source directory
32 mkdir src-temp
32 mkdir src-temp
33 cd src-temp
33 cd src-temp
34 echo a > a
34 echo a > a
35 mkdir b
35 mkdir b
36 cd b
36 cd b
37 echo c > c
37 echo c > c
38 cd ..
38 cd ..
39
39
40 echo % import source directory
40 echo % import source directory
41 cvscall -q import -m import src INITIAL start
41 cvscall -q import -m import src INITIAL start
42 cd ..
42 cd ..
43
43
44 echo % checkout source directory
44 echo % checkout source directory
45 cvscall -q checkout src
45 cvscall -q checkout src
46
46
47 echo % commit a new revision changing b/c
47 echo % commit a new revision changing b/c
48 cd src
48 cd src
49 sleep 1
49 sleep 1
50 echo c >> b/c
50 echo c >> b/c
51 cvscall -q commit -mci0 . | grep '<--' |\
51 cvscall -q commit -mci0 . | grep '<--' |\
52 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
52 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
53 cd ..
53 cd ..
54
54
55 echo % convert fresh repo
55 echo % convert fresh repo
56 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
56 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
57 hgcat a
57 hgcat a
58 hgcat b/c
58 hgcat b/c
59
59
60 echo % convert fresh repo with --filemap
60 echo % convert fresh repo with --filemap
61 echo include b/c > filemap
61 echo include b/c > filemap
62 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
62 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
63 hgcat b/c
63 hgcat b/c
64 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
64 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
65
65
66 echo % commit new file revisions
66 echo % commit new file revisions
67 cd src
67 cd src
68 echo a >> a
68 echo a >> a
69 echo c >> b/c
69 echo c >> b/c
70 cvscall -q commit -mci1 . | grep '<--' |\
70 cvscall -q commit -mci1 . | grep '<--' |\
71 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
71 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
72 cd ..
72 cd ..
73
73
74 echo % convert again
74 echo % convert again
75 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
75 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
76 hgcat a
76 hgcat a
77 hgcat b/c
77 hgcat b/c
78
78
79 echo % convert again with --filemap
79 echo % convert again with --filemap
80 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
80 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
81 hgcat b/c
81 hgcat b/c
82 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
82 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
83
83
84 echo % commit branch
84 echo % commit branch
85 cd src
85 cd src
86 cvs -q update -r1.1 b/c
86 cvs -q update -r1.1 b/c
87 cvs -q tag -b branch
87 cvs -q tag -b branch
88 cvs -q update -r branch
88 cvs -q update -r branch > /dev/null
89 echo d >> b/c
89 echo d >> b/c
90 cvs -q commit -mci2 . | grep '<--' |\
90 cvs -q commit -mci2 . | grep '<--' |\
91 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
91 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
92 cd ..
92 cd ..
93
93
94 echo % convert again
94 echo % convert again
95 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
95 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
96 hgcat a
96 hgcat a
97 hgcat b/c
97 hgcat b/c
98
98
99 echo % convert again with --filemap
99 echo % convert again with --filemap
100 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
100 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
101 hgcat b/c
101 hgcat b/c
102 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
102 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
103 hg -R src-hg glog --template '#rev# (#branches#) #desc# files: #files#\n'
103 hg -R src-hg glog --template '#rev# (#branches#) #desc# files: #files#\n'
@@ -1,61 +1,61 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 # This is http://www.selenic.com/mercurial/bts/issue1148
3 # This is http://www.selenic.com/mercurial/bts/issue1148
4
4
5 "$TESTDIR/hghave" cvs || exit 80
5 "$TESTDIR/hghave" cvs || exit 80
6
6
7 cvscall()
7 cvscall()
8 {
8 {
9 cvs -f "$@"
9 cvs -f "$@"
10 }
10 }
11
11
12 echo "[extensions]" >> $HGRCPATH
12 echo "[extensions]" >> $HGRCPATH
13 echo "convert = " >> $HGRCPATH
13 echo "convert = " >> $HGRCPATH
14 echo "graphlog = " >> $HGRCPATH
14 echo "graphlog = " >> $HGRCPATH
15 echo "[convert]" >> $HGRCPATH
15 echo "[convert]" >> $HGRCPATH
16 echo "cvsps=builtin" >> $HGRCPATH
16 echo "cvsps=builtin" >> $HGRCPATH
17
17
18 echo % create cvs repository
18 echo % create cvs repository
19 mkdir cvsrepo
19 mkdir cvsrepo
20 cd cvsrepo
20 cd cvsrepo
21 export CVSROOT=`pwd`
21 export CVSROOT=`pwd`
22 export CVS_OPTIONS=-f
22 export CVS_OPTIONS=-f
23 cd ..
23 cd ..
24
24
25 cvscall -q -d "$CVSROOT" init
25 cvscall -q -d "$CVSROOT" init
26
26
27 echo % Create a new project
27 echo % Create a new project
28
28
29 mkdir src
29 mkdir src
30 cd src
30 cd src
31 echo "1" > a
31 echo "1" > a
32 echo "1" > b
32 echo "1" > b
33 cvscall import -m "init" src v0 r0 | sort
33 cvscall import -m "init" src v0 r0 | sort
34 cd ..
34 cd ..
35 cvscall co src
35 cvscall co src
36 cd src
36 cd src
37
37
38 echo % Branch the project
38 echo % Branch the project
39
39
40 cvscall tag -b BRANCH
40 cvscall tag -b BRANCH
41 cvscall up -r BRANCH
41 cvscall up -r BRANCH > /dev/null
42
42
43 echo % Modify file a, then b, then a
43 echo % Modify file a, then b, then a
44
44
45 echo "2" > a
45 echo "2" > a
46 cvscall ci -m "mod a" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
46 cvscall ci -m "mod a" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
47
47
48 echo "2" > b
48 echo "2" > b
49 cvscall ci -m "mod b" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
49 cvscall ci -m "mod b" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
50
50
51 echo "3" > a
51 echo "3" > a
52 cvscall ci -m "mod a again" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
52 cvscall ci -m "mod a again" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
53
53
54 echo % Convert
54 echo % Convert
55
55
56 cd ..
56 cd ..
57 hg convert src | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
57 hg convert src | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
58
58
59 echo % Check the result
59 echo % Check the result
60
60
61 hg -R src-hg glog --template '#rev# (#branches#) #desc# files: #files#\n'
61 hg -R src-hg glog --template '#rev# (#branches#) #desc# files: #files#\n'
@@ -1,121 +1,121 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 "$TESTDIR/hghave" cvs || exit 80
3 "$TESTDIR/hghave" cvs || exit 80
4
4
5 cvscall()
5 cvscall()
6 {
6 {
7 cvs -f "$@"
7 cvs -f "$@"
8 }
8 }
9
9
10 hgcat()
10 hgcat()
11 {
11 {
12 hg --cwd src-hg cat -r tip "$1"
12 hg --cwd src-hg cat -r tip "$1"
13 }
13 }
14
14
15 echo "[extensions]" >> $HGRCPATH
15 echo "[extensions]" >> $HGRCPATH
16 echo "convert = " >> $HGRCPATH
16 echo "convert = " >> $HGRCPATH
17 echo "graphlog = " >> $HGRCPATH
17 echo "graphlog = " >> $HGRCPATH
18 echo "[convert]" >> $HGRCPATH
18 echo "[convert]" >> $HGRCPATH
19 echo "cvsps=builtin" >> $HGRCPATH
19 echo "cvsps=builtin" >> $HGRCPATH
20
20
21 echo % create cvs repository
21 echo % create cvs repository
22 mkdir cvsrepo
22 mkdir cvsrepo
23 cd cvsrepo
23 cd cvsrepo
24 export CVSROOT=`pwd`
24 export CVSROOT=`pwd`
25 export CVS_OPTIONS=-f
25 export CVS_OPTIONS=-f
26 cd ..
26 cd ..
27
27
28 cvscall -q -d "$CVSROOT" init
28 cvscall -q -d "$CVSROOT" init
29
29
30 echo % create source directory
30 echo % create source directory
31 mkdir src-temp
31 mkdir src-temp
32 cd src-temp
32 cd src-temp
33 echo a > a
33 echo a > a
34 mkdir b
34 mkdir b
35 cd b
35 cd b
36 echo c > c
36 echo c > c
37 cd ..
37 cd ..
38
38
39 echo % import source directory
39 echo % import source directory
40 cvscall -q import -m import src INITIAL start
40 cvscall -q import -m import src INITIAL start
41 cd ..
41 cd ..
42
42
43 echo % checkout source directory
43 echo % checkout source directory
44 cvscall -q checkout src
44 cvscall -q checkout src
45
45
46 echo % commit a new revision changing b/c
46 echo % commit a new revision changing b/c
47 cd src
47 cd src
48 sleep 1
48 sleep 1
49 echo c >> b/c
49 echo c >> b/c
50 cvscall -q commit -mci0 . | grep '<--' |\
50 cvscall -q commit -mci0 . | grep '<--' |\
51 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
51 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
52 cd ..
52 cd ..
53
53
54 echo % convert fresh repo
54 echo % convert fresh repo
55 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
55 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
56 hgcat a
56 hgcat a
57 hgcat b/c
57 hgcat b/c
58
58
59 echo % convert fresh repo with --filemap
59 echo % convert fresh repo with --filemap
60 echo include b/c > filemap
60 echo include b/c > filemap
61 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
61 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
62 hgcat b/c
62 hgcat b/c
63 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
63 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
64
64
65 echo % commit new file revisions
65 echo % commit new file revisions
66 cd src
66 cd src
67 echo a >> a
67 echo a >> a
68 echo c >> b/c
68 echo c >> b/c
69 cvscall -q commit -mci1 . | grep '<--' |\
69 cvscall -q commit -mci1 . | grep '<--' |\
70 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
70 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
71 cd ..
71 cd ..
72
72
73 echo % convert again
73 echo % convert again
74 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
74 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
75 hgcat a
75 hgcat a
76 hgcat b/c
76 hgcat b/c
77
77
78 echo % convert again with --filemap
78 echo % convert again with --filemap
79 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
79 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
80 hgcat b/c
80 hgcat b/c
81 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
81 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
82
82
83 echo % commit branch
83 echo % commit branch
84 cd src
84 cd src
85 cvs -q update -r1.1 b/c
85 cvs -q update -r1.1 b/c
86 cvs -q tag -b branch
86 cvs -q tag -b branch
87 cvs -q update -r branch
87 cvs -q update -r branch > /dev/null
88 echo d >> b/c
88 echo d >> b/c
89 cvs -q commit -mci2 . | grep '<--' |\
89 cvs -q commit -mci2 . | grep '<--' |\
90 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
90 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
91 cd ..
91 cd ..
92
92
93 echo % convert again
93 echo % convert again
94 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
94 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
95 hgcat a
95 hgcat a
96 hgcat b/c
96 hgcat b/c
97
97
98 echo % convert again with --filemap
98 echo % convert again with --filemap
99 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
99 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
100 hgcat b/c
100 hgcat b/c
101 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
101 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
102
102
103 echo % commit a new revision with funny log message
103 echo % commit a new revision with funny log message
104 cd src
104 cd src
105 sleep 1
105 sleep 1
106 echo e >> a
106 echo e >> a
107 cvscall -q commit -m'funny
107 cvscall -q commit -m'funny
108 ----------------------------
108 ----------------------------
109 log message' . | grep '<--' |\
109 log message' . | grep '<--' |\
110 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
110 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
111 cd ..
111 cd ..
112
112
113 echo % convert again
113 echo % convert again
114 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
114 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
115
115
116 echo "graphlog = " >> $HGRCPATH
116 echo "graphlog = " >> $HGRCPATH
117 hg -R src-hg glog --template '#rev# (#branches#) #desc# files: #files#\n'
117 hg -R src-hg glog --template '#rev# (#branches#) #desc# files: #files#\n'
118
118
119 echo % testing debugcvsps
119 echo % testing debugcvsps
120 cd src
120 cd src
121 hg debugcvsps | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/'
121 hg debugcvsps | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/'
General Comments 0
You need to be logged in to leave comments. Login now