##// END OF EJS Templates
tests: update test-convert-cvs*.t...
Bryan O'Sullivan -
r18262:ed923a2d default
parent child Browse files
Show More
@@ -1,217 +1,223
1 This feature requires use of builtin cvsps!
1 This feature requires use of builtin cvsps!
2
2
3 $ "$TESTDIR/hghave" cvs || exit 80
3 $ "$TESTDIR/hghave" cvs || exit 80
4 $ echo "[extensions]" >> $HGRCPATH
4 $ echo "[extensions]" >> $HGRCPATH
5 $ echo "convert = " >> $HGRCPATH
5 $ echo "convert = " >> $HGRCPATH
6 $ echo "graphlog = " >> $HGRCPATH
6 $ echo "graphlog = " >> $HGRCPATH
7
7
8 create cvs repository with one project
8 create cvs repository with one project
9
9
10 $ mkdir cvsrepo
10 $ mkdir cvsrepo
11 $ cd cvsrepo
11 $ cd cvsrepo
12 $ CVSROOT=`pwd`
12 $ CVSROOT=`pwd`
13 $ export CVSROOT
13 $ export CVSROOT
14 $ CVS_OPTIONS=-f
14 $ CVS_OPTIONS=-f
15 $ export CVS_OPTIONS
15 $ export CVS_OPTIONS
16 $ cd ..
16 $ cd ..
17 $ cvscall()
17 $ cvscall()
18 > {
18 > {
19 > cvs -f "$@"
19 > cvs -f "$@"
20 > }
20 > }
21
21
22 output of 'cvs ci' varies unpredictably, so just discard it
22 output of 'cvs ci' varies unpredictably, so just discard it
23
23
24 $ cvsci()
24 $ cvsci()
25 > {
25 > {
26 > sleep 1
26 > sleep 1
27 > cvs -f ci "$@" >/dev/null
27 > cvs -f ci "$@" >/dev/null
28 > }
28 > }
29 $ cvscall -d "$CVSROOT" init
29 $ cvscall -d "$CVSROOT" init
30 $ mkdir cvsrepo/proj
30 $ mkdir cvsrepo/proj
31 $ cvscall -q co proj
31 $ cvscall -q co proj
32
32
33 create file1 on the trunk
33 create file1 on the trunk
34
34
35 $ cd proj
35 $ cd proj
36 $ touch file1
36 $ touch file1
37 $ cvscall -Q add file1
37 $ cvscall -Q add file1
38 $ cvsci -m"add file1 on trunk" file1
38 $ cvsci -m"add file1 on trunk" file1
39
39
40 create two branches
40 create two branches
41
41
42 $ cvscall -q tag -b v1_0
42 $ cvscall -q tag -b v1_0
43 T file1
43 T file1
44 $ cvscall -q tag -b v1_1
44 $ cvscall -q tag -b v1_1
45 T file1
45 T file1
46
46
47 create file2 on branch v1_0
47 create file2 on branch v1_0
48
48
49 $ cvscall -Q up -rv1_0
49 $ cvscall -Q up -rv1_0
50 $ touch file2
50 $ touch file2
51 $ cvscall -Q add file2
51 $ cvscall -Q add file2
52 $ cvsci -m"add file2" file2
52 $ cvsci -m"add file2" file2
53
53
54 create file3, file4 on branch v1_1
54 create file3, file4 on branch v1_1
55
55
56 $ cvscall -Q up -rv1_1
56 $ cvscall -Q up -rv1_1
57 $ touch file3
57 $ touch file3
58 $ touch file4
58 $ touch file4
59 $ cvscall -Q add file3 file4
59 $ cvscall -Q add file3 file4
60 $ cvsci -m"add file3, file4 on branch v1_1" file3 file4
60 $ cvsci -m"add file3, file4 on branch v1_1" file3 file4
61
61
62 merge file2 from v1_0 to v1_1
62 merge file2 from v1_0 to v1_1
63
63
64 $ cvscall -Q up -jv1_0
64 $ cvscall -Q up -jv1_0
65 $ cvsci -m"MERGE from v1_0: add file2"
65 $ cvsci -m"MERGE from v1_0: add file2"
66 cvs commit: Examining .
66 cvs commit: Examining .
67
67
68 Step things up a notch: now we make the history really hairy, with
68 Step things up a notch: now we make the history really hairy, with
69 changes bouncing back and forth between trunk and v1_2 and merges
69 changes bouncing back and forth between trunk and v1_2 and merges
70 going both ways. (I.e., try to model the real world.)
70 going both ways. (I.e., try to model the real world.)
71 create branch v1_2
71 create branch v1_2
72
72
73 $ cvscall -Q up -A
73 $ cvscall -Q up -A
74 $ cvscall -q tag -b v1_2
74 $ cvscall -q tag -b v1_2
75 T file1
75 T file1
76
76
77 create file5 on branch v1_2
77 create file5 on branch v1_2
78
78
79 $ cvscall -Q up -rv1_2
79 $ cvscall -Q up -rv1_2
80 $ touch file5
80 $ touch file5
81 $ cvs -Q add file5
81 $ cvs -Q add file5
82 $ cvsci -m"add file5 on v1_2"
82 $ cvsci -m"add file5 on v1_2"
83 cvs commit: Examining .
83 cvs commit: Examining .
84
84
85 create file6 on trunk post-v1_2
85 create file6 on trunk post-v1_2
86
86
87 $ cvscall -Q up -A
87 $ cvscall -Q up -A
88 $ touch file6
88 $ touch file6
89 $ cvscall -Q add file6
89 $ cvscall -Q add file6
90 $ cvsci -m"add file6 on trunk post-v1_2"
90 $ cvsci -m"add file6 on trunk post-v1_2"
91 cvs commit: Examining .
91 cvs commit: Examining .
92
92
93 merge file5 from v1_2 to trunk
93 merge file5 from v1_2 to trunk
94
94
95 $ cvscall -Q up -A
95 $ cvscall -Q up -A
96 $ cvscall -Q up -jv1_2 file5
96 $ cvscall -Q up -jv1_2 file5
97 $ cvsci -m"MERGE from v1_2: add file5"
97 $ cvsci -m"MERGE from v1_2: add file5"
98 cvs commit: Examining .
98 cvs commit: Examining .
99
99
100 merge file6 from trunk to v1_2
100 merge file6 from trunk to v1_2
101
101
102 $ cvscall -Q up -rv1_2
102 $ cvscall -Q up -rv1_2
103 $ cvscall up -jHEAD file6
103 $ cvscall up -jHEAD file6
104 U file6
104 U file6
105 $ cvsci -m"MERGE from HEAD: add file6"
105 $ cvsci -m"MERGE from HEAD: add file6"
106 cvs commit: Examining .
106 cvs commit: Examining .
107
107
108 cvs rlog output
108 cvs rlog output
109
109
110 $ cvscall -q rlog proj | egrep '^(RCS file|revision)'
110 $ cvscall -q rlog proj | egrep '^(RCS file|revision)'
111 RCS file: $TESTTMP/cvsrepo/proj/file1,v
111 RCS file: $TESTTMP/cvsrepo/proj/file1,v
112 revision 1.1
112 revision 1.1
113 RCS file: $TESTTMP/cvsrepo/proj/Attic/file2,v
113 RCS file: $TESTTMP/cvsrepo/proj/Attic/file2,v
114 revision 1.1
114 revision 1.1
115 revision 1.1.4.2
115 revision 1.1.4.2
116 revision 1.1.4.1
116 revision 1.1.4.1
117 revision 1.1.2.1
117 revision 1.1.2.1
118 RCS file: $TESTTMP/cvsrepo/proj/Attic/file3,v
118 RCS file: $TESTTMP/cvsrepo/proj/Attic/file3,v
119 revision 1.1
119 revision 1.1
120 revision 1.1.2.1
120 revision 1.1.2.1
121 RCS file: $TESTTMP/cvsrepo/proj/Attic/file4,v
121 RCS file: $TESTTMP/cvsrepo/proj/Attic/file4,v
122 revision 1.1
122 revision 1.1
123 revision 1.1.2.1
123 revision 1.1.2.1
124 RCS file: $TESTTMP/cvsrepo/proj/file5,v
124 RCS file: $TESTTMP/cvsrepo/proj/file5,v
125 revision 1.2
125 revision 1.2
126 revision 1.1
126 revision 1.1
127 revision 1.1.2.1
127 revision 1.1.2.1
128 RCS file: $TESTTMP/cvsrepo/proj/file6,v
128 RCS file: $TESTTMP/cvsrepo/proj/file6,v
129 revision 1.1
129 revision 1.1
130 revision 1.1.2.2
130 revision 1.1.2.2
131 revision 1.1.2.1
131 revision 1.1.2.1
132
132
133 convert to hg (#1)
133 convert to hg (#1)
134
134
135 $ cd ..
135 $ cd ..
136 $ hg convert --datesort proj proj.hg
136 $ hg convert --datesort proj proj.hg
137 initializing destination proj.hg repository
137 initializing destination proj.hg repository
138 connecting to $TESTTMP/cvsrepo
138 connecting to $TESTTMP/cvsrepo
139 scanning source...
139 scanning source...
140 collecting CVS rlog
140 collecting CVS rlog
141 15 log entries
141 15 log entries
142 creating changesets
142 creating changesets
143 8 changeset entries
143 9 changeset entries
144 sorting...
144 sorting...
145 converting...
145 converting...
146 7 add file1 on trunk
146 8 add file1 on trunk
147 6 add file2
147 7 add file2
148 5 add file3, file4 on branch v1_1
148 6 MERGE from v1_0: add file2
149 4 MERGE from v1_0: add file2
149 5 file file3 was initially added on branch v1_1.
150 4 add file3, file4 on branch v1_1
150 3 add file5 on v1_2
151 3 add file5 on v1_2
151 2 add file6 on trunk post-v1_2
152 2 add file6 on trunk post-v1_2
152 1 MERGE from v1_2: add file5
153 1 MERGE from HEAD: add file6
153 0 MERGE from HEAD: add file6
154 0 MERGE from v1_2: add file5
154
155
155 hg glog output (#1)
156 hg glog output (#1)
156
157
157 $ hg -R proj.hg glog --template "{rev} {desc}\n"
158 $ hg -R proj.hg glog --template "{rev} {desc}\n"
158 o 7 MERGE from HEAD: add file6
159 o 8 MERGE from v1_2: add file5
159 |
160 |
160 | o 6 MERGE from v1_2: add file5
161 | o 7 MERGE from HEAD: add file6
161 | |
162 | |
162 | o 5 add file6 on trunk post-v1_2
163 o | 6 add file6 on trunk post-v1_2
163 | |
164 | |
164 o | 4 add file5 on v1_2
165 | o 5 add file5 on v1_2
165 |/
166 | o 3 MERGE from v1_0: add file2
167 | |
166 | |
168 | o 2 add file3, file4 on branch v1_1
167 | | o 4 add file3, file4 on branch v1_1
168 | | |
169 o | | 3 file file3 was initially added on branch v1_1.
170 |/ /
171 | o 2 MERGE from v1_0: add file2
169 |/
172 |/
170 | o 1 add file2
173 | o 1 add file2
171 |/
174 |/
172 o 0 add file1 on trunk
175 o 0 add file1 on trunk
173
176
174
177
175 convert to hg (#2: with merge detection)
178 convert to hg (#2: with merge detection)
176
179
177 $ hg convert \
180 $ hg convert \
178 > --config convert.cvsps.mergefrom='"^MERGE from (\S+):"' \
181 > --config convert.cvsps.mergefrom='"^MERGE from (\S+):"' \
179 > --datesort \
182 > --datesort \
180 > proj proj.hg2
183 > proj proj.hg2
181 initializing destination proj.hg2 repository
184 initializing destination proj.hg2 repository
182 connecting to $TESTTMP/cvsrepo
185 connecting to $TESTTMP/cvsrepo
183 scanning source...
186 scanning source...
184 collecting CVS rlog
187 collecting CVS rlog
185 15 log entries
188 15 log entries
186 creating changesets
189 creating changesets
187 8 changeset entries
190 9 changeset entries
188 sorting...
191 sorting...
189 converting...
192 converting...
190 7 add file1 on trunk
193 8 add file1 on trunk
191 6 add file2
194 7 add file2
192 5 add file3, file4 on branch v1_1
195 6 MERGE from v1_0: add file2
193 4 MERGE from v1_0: add file2
196 5 file file3 was initially added on branch v1_1.
197 4 add file3, file4 on branch v1_1
194 3 add file5 on v1_2
198 3 add file5 on v1_2
195 2 add file6 on trunk post-v1_2
199 2 add file6 on trunk post-v1_2
196 1 MERGE from v1_2: add file5
200 1 MERGE from HEAD: add file6
197 0 MERGE from HEAD: add file6
201 0 MERGE from v1_2: add file5
198
202
199 hg glog output (#2)
203 hg glog output (#2)
200
204
201 $ hg -R proj.hg2 glog --template "{rev} {desc}\n"
205 $ hg -R proj.hg2 glog --template "{rev} {desc}\n"
202 o 7 MERGE from HEAD: add file6
206 o 8 MERGE from v1_2: add file5
203 |
207 |
204 | o 6 MERGE from v1_2: add file5
208 | o 7 MERGE from HEAD: add file6
205 | |
209 | |
206 | o 5 add file6 on trunk post-v1_2
210 o | 6 add file6 on trunk post-v1_2
207 | |
211 | |
208 o | 4 add file5 on v1_2
212 | o 5 add file5 on v1_2
209 |/
210 | o 3 MERGE from v1_0: add file2
211 | |
213 | |
212 | o 2 add file3, file4 on branch v1_1
214 | | o 4 add file3, file4 on branch v1_1
215 | | |
216 o | | 3 file file3 was initially added on branch v1_1.
217 |/ /
218 | o 2 MERGE from v1_0: add file2
213 |/
219 |/
214 | o 1 add file2
220 | o 1 add file2
215 |/
221 |/
216 o 0 add file1 on trunk
222 o 0 add file1 on trunk
217
223
@@ -1,468 +1,468
1
1
2 $ "$TESTDIR/hghave" cvs || exit 80
2 $ "$TESTDIR/hghave" cvs || exit 80
3 $ cvscall()
3 $ cvscall()
4 > {
4 > {
5 > cvs -f "$@"
5 > cvs -f "$@"
6 > }
6 > }
7 $ hgcat()
7 $ hgcat()
8 > {
8 > {
9 > hg --cwd src-hg cat -r tip "$1"
9 > hg --cwd src-hg cat -r tip "$1"
10 > }
10 > }
11 $ echo "[extensions]" >> $HGRCPATH
11 $ echo "[extensions]" >> $HGRCPATH
12 $ echo "convert = " >> $HGRCPATH
12 $ echo "convert = " >> $HGRCPATH
13 $ echo "graphlog = " >> $HGRCPATH
13 $ echo "graphlog = " >> $HGRCPATH
14 $ cat > cvshooks.py <<EOF
14 $ cat > cvshooks.py <<EOF
15 > def cvslog(ui,repo,hooktype,log):
15 > def cvslog(ui,repo,hooktype,log):
16 > print "%s hook: %d entries"%(hooktype,len(log))
16 > print "%s hook: %d entries"%(hooktype,len(log))
17 >
17 >
18 > def cvschangesets(ui,repo,hooktype,changesets):
18 > def cvschangesets(ui,repo,hooktype,changesets):
19 > print "%s hook: %d changesets"%(hooktype,len(changesets))
19 > print "%s hook: %d changesets"%(hooktype,len(changesets))
20 > EOF
20 > EOF
21 $ hookpath=`pwd`
21 $ hookpath=`pwd`
22 $ echo "[hooks]" >> $HGRCPATH
22 $ echo "[hooks]" >> $HGRCPATH
23 $ echo "cvslog=python:$hookpath/cvshooks.py:cvslog" >> $HGRCPATH
23 $ echo "cvslog=python:$hookpath/cvshooks.py:cvslog" >> $HGRCPATH
24 $ echo "cvschangesets=python:$hookpath/cvshooks.py:cvschangesets" >> $HGRCPATH
24 $ echo "cvschangesets=python:$hookpath/cvshooks.py:cvschangesets" >> $HGRCPATH
25
25
26 create cvs repository
26 create cvs repository
27
27
28 $ mkdir cvsrepo
28 $ mkdir cvsrepo
29 $ cd cvsrepo
29 $ cd cvsrepo
30 $ CVSROOT=`pwd`
30 $ CVSROOT=`pwd`
31 $ export CVSROOT
31 $ export CVSROOT
32 $ CVS_OPTIONS=-f
32 $ CVS_OPTIONS=-f
33 $ export CVS_OPTIONS
33 $ export CVS_OPTIONS
34 $ cd ..
34 $ cd ..
35 $ cvscall -q -d "$CVSROOT" init
35 $ cvscall -q -d "$CVSROOT" init
36
36
37 create source directory
37 create source directory
38
38
39 $ mkdir src-temp
39 $ mkdir src-temp
40 $ cd src-temp
40 $ cd src-temp
41 $ echo a > a
41 $ echo a > a
42 $ mkdir b
42 $ mkdir b
43 $ cd b
43 $ cd b
44 $ echo c > c
44 $ echo c > c
45 $ cd ..
45 $ cd ..
46
46
47 import source directory
47 import source directory
48
48
49 $ cvscall -q import -m import src INITIAL start
49 $ cvscall -q import -m import src INITIAL start
50 N src/a
50 N src/a
51 N src/b/c
51 N src/b/c
52
52
53 No conflicts created by this import
53 No conflicts created by this import
54
54
55 $ cd ..
55 $ cd ..
56
56
57 checkout source directory
57 checkout source directory
58
58
59 $ cvscall -q checkout src
59 $ cvscall -q checkout src
60 U src/a
60 U src/a
61 U src/b/c
61 U src/b/c
62
62
63 commit a new revision changing b/c
63 commit a new revision changing b/c
64
64
65 $ cd src
65 $ cd src
66 $ sleep 1
66 $ sleep 1
67 $ echo c >> b/c
67 $ echo c >> b/c
68 $ cvscall -q commit -mci0 . | grep '<--'
68 $ cvscall -q commit -mci0 . | grep '<--'
69 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
69 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
70 $ cd ..
70 $ cd ..
71
71
72 convert fresh repo and also check localtimezone option
72 convert fresh repo and also check localtimezone option
73
73
74 NOTE: This doesn't check all time zones -- it merely determines that
74 NOTE: This doesn't check all time zones -- it merely determines that
75 the configuration option is taking effect.
75 the configuration option is taking effect.
76
76
77 An arbitrary (U.S.) time zone is used here. TZ=US/Hawaii is selected
77 An arbitrary (U.S.) time zone is used here. TZ=US/Hawaii is selected
78 since it does not use DST (unlike other U.S. time zones) and is always
78 since it does not use DST (unlike other U.S. time zones) and is always
79 a fixed difference from UTC.
79 a fixed difference from UTC.
80
80
81 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
81 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
82 initializing destination src-hg repository
82 initializing destination src-hg repository
83 connecting to $TESTTMP/cvsrepo
83 connecting to $TESTTMP/cvsrepo
84 scanning source...
84 scanning source...
85 collecting CVS rlog
85 collecting CVS rlog
86 5 log entries
86 5 log entries
87 cvslog hook: 5 entries
87 cvslog hook: 5 entries
88 creating changesets
88 creating changesets
89 3 changeset entries
89 3 changeset entries
90 cvschangesets hook: 3 changesets
90 cvschangesets hook: 3 changesets
91 sorting...
91 sorting...
92 converting...
92 converting...
93 2 Initial revision
93 2 Initial revision
94 1 import
94 1 import
95 0 ci0
95 0 ci0
96 updating tags
96 updating tags
97 $ hgcat a
97 $ hgcat a
98 a
98 a
99 $ hgcat b/c
99 $ hgcat b/c
100 c
100 c
101 c
101 c
102
102
103 convert fresh repo with --filemap
103 convert fresh repo with --filemap
104
104
105 $ echo include b/c > filemap
105 $ echo include b/c > filemap
106 $ hg convert --filemap filemap src src-filemap
106 $ hg convert --filemap filemap src src-filemap
107 initializing destination src-filemap repository
107 initializing destination src-filemap repository
108 connecting to $TESTTMP/cvsrepo
108 connecting to $TESTTMP/cvsrepo
109 scanning source...
109 scanning source...
110 collecting CVS rlog
110 collecting CVS rlog
111 5 log entries
111 5 log entries
112 cvslog hook: 5 entries
112 cvslog hook: 5 entries
113 creating changesets
113 creating changesets
114 3 changeset entries
114 3 changeset entries
115 cvschangesets hook: 3 changesets
115 cvschangesets hook: 3 changesets
116 sorting...
116 sorting...
117 converting...
117 converting...
118 2 Initial revision
118 2 Initial revision
119 1 import
119 1 import
120 filtering out empty revision
120 filtering out empty revision
121 repository tip rolled back to revision 0 (undo commit)
121 repository tip rolled back to revision 0 (undo commit)
122 0 ci0
122 0 ci0
123 updating tags
123 updating tags
124 $ hgcat b/c
124 $ hgcat b/c
125 c
125 c
126 c
126 c
127 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
127 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
128 2 update tags files: .hgtags
128 2 update tags files: .hgtags
129 1 ci0 files: b/c
129 1 ci0 files: b/c
130 0 Initial revision files: b/c
130 0 Initial revision files: b/c
131
131
132 convert full repository (issue1649)
132 convert full repository (issue1649)
133
133
134 $ cvscall -q -d "$CVSROOT" checkout -d srcfull "." | grep -v CVSROOT
134 $ cvscall -q -d "$CVSROOT" checkout -d srcfull "." | grep -v CVSROOT
135 U srcfull/src/a
135 U srcfull/src/a
136 U srcfull/src/b/c
136 U srcfull/src/b/c
137 $ ls srcfull
137 $ ls srcfull
138 CVS
138 CVS
139 CVSROOT
139 CVSROOT
140 src
140 src
141 $ hg convert srcfull srcfull-hg \
141 $ hg convert srcfull srcfull-hg \
142 > | grep -v 'log entries' | grep -v 'hook:' \
142 > | grep -v 'log entries' | grep -v 'hook:' \
143 > | grep -v '^[0-3] .*' # filter instable changeset order
143 > | grep -v '^[0-3] .*' # filter instable changeset order
144 initializing destination srcfull-hg repository
144 initializing destination srcfull-hg repository
145 connecting to $TESTTMP/cvsrepo
145 connecting to $TESTTMP/cvsrepo
146 scanning source...
146 scanning source...
147 collecting CVS rlog
147 collecting CVS rlog
148 creating changesets
148 creating changesets
149 4 changeset entries
149 4 changeset entries
150 sorting...
150 sorting...
151 converting...
151 converting...
152 updating tags
152 updating tags
153 $ hg cat -r tip --cwd srcfull-hg src/a
153 $ hg cat -r tip --cwd srcfull-hg src/a
154 a
154 a
155 $ hg cat -r tip --cwd srcfull-hg src/b/c
155 $ hg cat -r tip --cwd srcfull-hg src/b/c
156 c
156 c
157 c
157 c
158
158
159 commit new file revisions
159 commit new file revisions
160
160
161 $ cd src
161 $ cd src
162 $ echo a >> a
162 $ echo a >> a
163 $ echo c >> b/c
163 $ echo c >> b/c
164 $ cvscall -q commit -mci1 . | grep '<--'
164 $ cvscall -q commit -mci1 . | grep '<--'
165 $TESTTMP/cvsrepo/src/a,v <-- a
165 $TESTTMP/cvsrepo/src/a,v <-- a
166 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
166 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
167 $ cd ..
167 $ cd ..
168
168
169 convert again
169 convert again
170
170
171 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
171 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
172 connecting to $TESTTMP/cvsrepo
172 connecting to $TESTTMP/cvsrepo
173 scanning source...
173 scanning source...
174 collecting CVS rlog
174 collecting CVS rlog
175 7 log entries
175 7 log entries
176 cvslog hook: 7 entries
176 cvslog hook: 7 entries
177 creating changesets
177 creating changesets
178 4 changeset entries
178 4 changeset entries
179 cvschangesets hook: 4 changesets
179 cvschangesets hook: 4 changesets
180 sorting...
180 sorting...
181 converting...
181 converting...
182 0 ci1
182 0 ci1
183 $ hgcat a
183 $ hgcat a
184 a
184 a
185 a
185 a
186 $ hgcat b/c
186 $ hgcat b/c
187 c
187 c
188 c
188 c
189 c
189 c
190
190
191 convert again with --filemap
191 convert again with --filemap
192
192
193 $ hg convert --filemap filemap src src-filemap
193 $ hg convert --filemap filemap src src-filemap
194 connecting to $TESTTMP/cvsrepo
194 connecting to $TESTTMP/cvsrepo
195 scanning source...
195 scanning source...
196 collecting CVS rlog
196 collecting CVS rlog
197 7 log entries
197 7 log entries
198 cvslog hook: 7 entries
198 cvslog hook: 7 entries
199 creating changesets
199 creating changesets
200 4 changeset entries
200 4 changeset entries
201 cvschangesets hook: 4 changesets
201 cvschangesets hook: 4 changesets
202 sorting...
202 sorting...
203 converting...
203 converting...
204 0 ci1
204 0 ci1
205 $ hgcat b/c
205 $ hgcat b/c
206 c
206 c
207 c
207 c
208 c
208 c
209 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
209 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
210 3 ci1 files: b/c
210 3 ci1 files: b/c
211 2 update tags files: .hgtags
211 2 update tags files: .hgtags
212 1 ci0 files: b/c
212 1 ci0 files: b/c
213 0 Initial revision files: b/c
213 0 Initial revision files: b/c
214
214
215 commit branch
215 commit branch
216
216
217 $ cd src
217 $ cd src
218 $ cvs -q update -r1.1 b/c
218 $ cvs -q update -r1.1 b/c
219 U b/c
219 U b/c
220 $ cvs -q tag -b branch
220 $ cvs -q tag -b branch
221 T a
221 T a
222 T b/c
222 T b/c
223 $ cvs -q update -r branch > /dev/null
223 $ cvs -q update -r branch > /dev/null
224 $ echo d >> b/c
224 $ echo d >> b/c
225 $ cvs -q commit -mci2 . | grep '<--'
225 $ cvs -q commit -mci2 . | grep '<--'
226 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
226 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
227 $ cd ..
227 $ cd ..
228
228
229 convert again
229 convert again
230
230
231 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
231 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True src src-hg
232 connecting to $TESTTMP/cvsrepo
232 connecting to $TESTTMP/cvsrepo
233 scanning source...
233 scanning source...
234 collecting CVS rlog
234 collecting CVS rlog
235 8 log entries
235 8 log entries
236 cvslog hook: 8 entries
236 cvslog hook: 8 entries
237 creating changesets
237 creating changesets
238 5 changeset entries
238 5 changeset entries
239 cvschangesets hook: 5 changesets
239 cvschangesets hook: 5 changesets
240 sorting...
240 sorting...
241 converting...
241 converting...
242 0 ci2
242 0 ci2
243 $ hgcat b/c
243 $ hgcat b/c
244 c
244 c
245 d
245 d
246
246
247 convert again with --filemap
247 convert again with --filemap
248
248
249 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True --filemap filemap src src-filemap
249 $ TZ=US/Hawaii hg convert --config convert.localtimezone=True --filemap filemap src src-filemap
250 connecting to $TESTTMP/cvsrepo
250 connecting to $TESTTMP/cvsrepo
251 scanning source...
251 scanning source...
252 collecting CVS rlog
252 collecting CVS rlog
253 8 log entries
253 8 log entries
254 cvslog hook: 8 entries
254 cvslog hook: 8 entries
255 creating changesets
255 creating changesets
256 5 changeset entries
256 5 changeset entries
257 cvschangesets hook: 5 changesets
257 cvschangesets hook: 5 changesets
258 sorting...
258 sorting...
259 converting...
259 converting...
260 0 ci2
260 0 ci2
261 $ hgcat b/c
261 $ hgcat b/c
262 c
262 c
263 d
263 d
264 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
264 $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n'
265 4 ci2 files: b/c
265 4 ci2 files: b/c
266 3 ci1 files: b/c
266 3 ci1 files: b/c
267 2 update tags files: .hgtags
267 2 update tags files: .hgtags
268 1 ci0 files: b/c
268 1 ci0 files: b/c
269 0 Initial revision files: b/c
269 0 Initial revision files: b/c
270
270
271 commit a new revision with funny log message
271 commit a new revision with funny log message
272
272
273 $ cd src
273 $ cd src
274 $ sleep 1
274 $ sleep 1
275 $ echo e >> a
275 $ echo e >> a
276 $ cvscall -q commit -m'funny
276 $ cvscall -q commit -m'funny
277 > ----------------------------
277 > ----------------------------
278 > log message' . | grep '<--' |\
278 > log message' . | grep '<--' |\
279 > sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
279 > sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
280 checking in src/a,v
280 checking in src/a,v
281
281
282 commit new file revisions with some fuzz
282 commit new file revisions with some fuzz
283
283
284 $ sleep 1
284 $ sleep 1
285 $ echo f >> a
285 $ echo f >> a
286 $ cvscall -q commit -mfuzzy . | grep '<--'
286 $ cvscall -q commit -mfuzzy . | grep '<--'
287 $TESTTMP/cvsrepo/src/a,v <-- a
287 $TESTTMP/cvsrepo/src/a,v <-- a
288 $ sleep 4 # the two changes will be split if fuzz < 4
288 $ sleep 4 # the two changes will be split if fuzz < 4
289 $ echo g >> b/c
289 $ echo g >> b/c
290 $ cvscall -q commit -mfuzzy . | grep '<--'
290 $ cvscall -q commit -mfuzzy . | grep '<--'
291 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
291 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
292 $ cd ..
292 $ cd ..
293
293
294 convert again
294 convert again
295
295
296 $ TZ=US/Hawaii hg convert --config convert.cvsps.fuzz=2 --config convert.localtimezone=True src src-hg
296 $ TZ=US/Hawaii hg convert --config convert.cvsps.fuzz=2 --config convert.localtimezone=True src src-hg
297 connecting to $TESTTMP/cvsrepo
297 connecting to $TESTTMP/cvsrepo
298 scanning source...
298 scanning source...
299 collecting CVS rlog
299 collecting CVS rlog
300 11 log entries
300 11 log entries
301 cvslog hook: 11 entries
301 cvslog hook: 11 entries
302 creating changesets
302 creating changesets
303 8 changeset entries
303 8 changeset entries
304 cvschangesets hook: 8 changesets
304 cvschangesets hook: 8 changesets
305 sorting...
305 sorting...
306 converting...
306 converting...
307 2 funny
307 2 funny
308 1 fuzzy
308 1 fuzzy
309 0 fuzzy
309 0 fuzzy
310 $ hg -R src-hg glog --template '{rev} ({branches}) {desc} date: {date|date} files: {files}\n'
310 $ hg -R src-hg glog --template '{rev} ({branches}) {desc} date: {date|date} files: {files}\n'
311 o 8 (branch) fuzzy date: * -1000 files: b/c (glob)
311 o 8 (branch) fuzzy date: * -1000 files: b/c (glob)
312 |
312 |
313 o 7 (branch) fuzzy date: * -1000 files: a (glob)
313 o 7 (branch) fuzzy date: * -1000 files: a (glob)
314 |
314 |
315 o 6 (branch) funny
315 o 6 (branch) funny
316 | ----------------------------
316 | ----------------------------
317 | log message date: * -1000 files: a (glob)
317 | log message date: * -1000 files: a (glob)
318 o 5 (branch) ci2 date: * -1000 files: b/c (glob)
318 o 5 (branch) ci2 date: * -1000 files: b/c (glob)
319
319
320 o 4 () ci1 date: * -1000 files: a b/c (glob)
320 o 4 () ci1 date: * -1000 files: a b/c (glob)
321 |
321 |
322 o 3 () update tags date: * +0000 files: .hgtags (glob)
322 o 3 () update tags date: * +0000 files: .hgtags (glob)
323 |
323 |
324 o 2 () ci0 date: * -1000 files: b/c (glob)
324 o 2 () ci0 date: * -1000 files: b/c (glob)
325 |
325 |
326 | o 1 (INITIAL) import date: * -1000 files: (glob)
326 | o 1 (INITIAL) import date: * -1000 files: (glob)
327 |/
327 |/
328 o 0 () Initial revision date: * -1000 files: a b/c (glob)
328 o 0 () Initial revision date: * -1000 files: a b/c (glob)
329
329
330
330
331 testing debugcvsps
331 testing debugcvsps
332
332
333 $ cd src
333 $ cd src
334 $ hg debugcvsps --fuzz=2
334 $ hg debugcvsps --fuzz=2
335 collecting CVS rlog
335 collecting CVS rlog
336 11 log entries
336 11 log entries
337 cvslog hook: 11 entries
337 cvslog hook: 11 entries
338 creating changesets
338 creating changesets
339 10 changeset entries
339 10 changeset entries
340 cvschangesets hook: 10 changesets
340 cvschangesets hook: 10 changesets
341 ---------------------
341 ---------------------
342 PatchSet 1
342 PatchSet 1
343 Date: * (glob)
343 Date: * (glob)
344 Author: * (glob)
344 Author: * (glob)
345 Branch: HEAD
345 Branch: HEAD
346 Tag: (none)
346 Tag: (none)
347 Branchpoints: INITIAL
347 Branchpoints: INITIAL
348 Log:
348 Log:
349 Initial revision
349 Initial revision
350
350
351 Members:
351 Members:
352 a:INITIAL->1.1
352 a:INITIAL->1.1
353
353
354 ---------------------
354 ---------------------
355 PatchSet 2
355 PatchSet 2
356 Date: * (glob)
356 Date: * (glob)
357 Author: * (glob)
357 Author: * (glob)
358 Branch: HEAD
358 Branch: HEAD
359 Tag: (none)
359 Tag: (none)
360 Branchpoints: INITIAL, branch
360 Branchpoints: INITIAL, branch
361 Log:
361 Log:
362 Initial revision
362 Initial revision
363
363
364 Members:
364 Members:
365 b/c:INITIAL->1.1
365 b/c:INITIAL->1.1
366
366
367 ---------------------
367 ---------------------
368 PatchSet 3
368 PatchSet 3
369 Date: * (glob)
369 Date: * (glob)
370 Author: * (glob)
370 Author: * (glob)
371 Branch: INITIAL
371 Branch: INITIAL
372 Tag: start
372 Tag: start
373 Log:
373 Log:
374 import
374 import
375
375
376 Members:
376 Members:
377 a:1.1->1.1.1.1
377 a:1.1->1.1.1.1
378 b/c:1.1->1.1.1.1
378 b/c:1.1->1.1.1.1
379
379
380 ---------------------
380 ---------------------
381 PatchSet 4
381 PatchSet 4
382 Date: * (glob)
382 Date: * (glob)
383 Author: * (glob)
383 Author: * (glob)
384 Branch: HEAD
384 Branch: HEAD
385 Tag: (none)
385 Tag: (none)
386 Log:
386 Log:
387 ci0
387 ci0
388
388
389 Members:
389 Members:
390 b/c:1.1->1.2
390 b/c:1.1->1.2
391
391
392 ---------------------
392 ---------------------
393 PatchSet 5
393 PatchSet 5
394 Date: * (glob)
394 Date: * (glob)
395 Author: * (glob)
395 Author: * (glob)
396 Branch: HEAD
396 Branch: HEAD
397 Tag: (none)
397 Tag: (none)
398 Branchpoints: branch
399 Log:
398 Log:
400 ci1
399 ci1
401
400
402 Members:
401 Members:
403 a:1.1->1.2
402 b/c:1.2->1.3
404
403
405 ---------------------
404 ---------------------
406 PatchSet 6
405 PatchSet 6
407 Date: * (glob)
406 Date: * (glob)
408 Author: * (glob)
407 Author: * (glob)
409 Branch: HEAD
408 Branch: HEAD
410 Tag: (none)
409 Tag: (none)
410 Branchpoints: branch
411 Log:
411 Log:
412 ci1
412 ci1
413
413
414 Members:
414 Members:
415 b/c:1.2->1.3
415 a:1.1->1.2
416
416
417 ---------------------
417 ---------------------
418 PatchSet 7
418 PatchSet 7
419 Date: * (glob)
419 Date: * (glob)
420 Author: * (glob)
420 Author: * (glob)
421 Branch: branch
421 Branch: branch
422 Tag: (none)
422 Tag: (none)
423 Log:
423 Log:
424 ci2
424 ci2
425
425
426 Members:
426 Members:
427 b/c:1.1->1.1.2.1
427 b/c:1.1->1.1.2.1
428
428
429 ---------------------
429 ---------------------
430 PatchSet 8
430 PatchSet 8
431 Date: * (glob)
431 Date: * (glob)
432 Author: * (glob)
432 Author: * (glob)
433 Branch: branch
433 Branch: branch
434 Tag: (none)
434 Tag: (none)
435 Log:
435 Log:
436 funny
436 funny
437 ----------------------------
437 ----------------------------
438 log message
438 log message
439
439
440 Members:
440 Members:
441 a:1.2->1.2.2.1
441 a:1.2->1.2.2.1
442
442
443 ---------------------
443 ---------------------
444 PatchSet 9
444 PatchSet 9
445 Date: * (glob)
445 Date: * (glob)
446 Author: * (glob)
446 Author: * (glob)
447 Branch: branch
447 Branch: branch
448 Tag: (none)
448 Tag: (none)
449 Log:
449 Log:
450 fuzzy
450 fuzzy
451
451
452 Members:
452 Members:
453 a:1.2.2.1->1.2.2.2
453 a:1.2.2.1->1.2.2.2
454
454
455 ---------------------
455 ---------------------
456 PatchSet 10
456 PatchSet 10
457 Date: * (glob)
457 Date: * (glob)
458 Author: * (glob)
458 Author: * (glob)
459 Branch: branch
459 Branch: branch
460 Tag: (none)
460 Tag: (none)
461 Log:
461 Log:
462 fuzzy
462 fuzzy
463
463
464 Members:
464 Members:
465 b/c:1.1.2.1->1.1.2.2
465 b/c:1.1.2.1->1.1.2.2
466
466
467
467
468 $ cd ..
468 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now