Show More
@@ -1,196 +1,196 b'' | |||||
1 | #require cvs |
|
1 | #require cvs no-root | |
2 |
|
2 | |||
3 | This is https://bz.mercurial-scm.org/1148 |
|
3 | This is https://bz.mercurial-scm.org/1148 | |
4 | and https://bz.mercurial-scm.org/1447 |
|
4 | and https://bz.mercurial-scm.org/1447 | |
5 |
|
5 | |||
6 | $ cvscall() |
|
6 | $ cvscall() | |
7 | > { |
|
7 | > { | |
8 | > cvs -f "$@" > /dev/null |
|
8 | > cvs -f "$@" > /dev/null | |
9 | > } |
|
9 | > } | |
10 | $ cat <<EOF >> $HGRCPATH |
|
10 | $ cat <<EOF >> $HGRCPATH | |
11 | > [extensions] |
|
11 | > [extensions] | |
12 | > convert = |
|
12 | > convert = | |
13 | > [convert] |
|
13 | > [convert] | |
14 | > cvsps.cache = 0 |
|
14 | > cvsps.cache = 0 | |
15 | > EOF |
|
15 | > EOF | |
16 |
|
16 | |||
17 | create cvs repository |
|
17 | create cvs repository | |
18 |
|
18 | |||
19 | $ mkdir cvsrepo |
|
19 | $ mkdir cvsrepo | |
20 | $ cd cvsrepo |
|
20 | $ cd cvsrepo | |
21 | $ CVSROOT=`pwd` |
|
21 | $ CVSROOT=`pwd` | |
22 | $ export CVSROOT |
|
22 | $ export CVSROOT | |
23 | $ CVS_OPTIONS=-f |
|
23 | $ CVS_OPTIONS=-f | |
24 | $ export CVS_OPTIONS |
|
24 | $ export CVS_OPTIONS | |
25 | $ cd .. |
|
25 | $ cd .. | |
26 | $ rmdir cvsrepo |
|
26 | $ rmdir cvsrepo | |
27 | $ cvscall -q -d "$CVSROOT" init |
|
27 | $ cvscall -q -d "$CVSROOT" init | |
28 |
|
28 | |||
29 | Create a new project |
|
29 | Create a new project | |
30 |
|
30 | |||
31 | $ mkdir src |
|
31 | $ mkdir src | |
32 | $ cd src |
|
32 | $ cd src | |
33 | $ echo "1" > a |
|
33 | $ echo "1" > a | |
34 | $ echo "1" > b |
|
34 | $ echo "1" > b | |
35 | $ cvscall import -m "init" src v0 r0 | sort |
|
35 | $ cvscall import -m "init" src v0 r0 | sort | |
36 | $ cd .. |
|
36 | $ cd .. | |
37 | $ cvscall co src |
|
37 | $ cvscall co src | |
38 | cvs checkout: Updating src |
|
38 | cvs checkout: Updating src | |
39 | $ cd src |
|
39 | $ cd src | |
40 |
|
40 | |||
41 | Branch the project |
|
41 | Branch the project | |
42 |
|
42 | |||
43 | $ cvscall tag -b BRANCH |
|
43 | $ cvscall tag -b BRANCH | |
44 | cvs tag: Tagging . |
|
44 | cvs tag: Tagging . | |
45 | $ cvscall up -r BRANCH > /dev/null |
|
45 | $ cvscall up -r BRANCH > /dev/null | |
46 | cvs update: Updating . |
|
46 | cvs update: Updating . | |
47 |
|
47 | |||
48 | Modify file a, then b, then a |
|
48 | Modify file a, then b, then a | |
49 |
|
49 | |||
50 | $ sleep 1 |
|
50 | $ sleep 1 | |
51 | $ echo "2" > a |
|
51 | $ echo "2" > a | |
52 | $ cvscall ci -m "mod a" |
|
52 | $ cvscall ci -m "mod a" | |
53 | cvs commit: Examining . |
|
53 | cvs commit: Examining . | |
54 | $ echo "2" > b |
|
54 | $ echo "2" > b | |
55 | $ cvscall ci -m "mod b" |
|
55 | $ cvscall ci -m "mod b" | |
56 | cvs commit: Examining . |
|
56 | cvs commit: Examining . | |
57 | $ sleep 1 |
|
57 | $ sleep 1 | |
58 | $ echo "3" > a |
|
58 | $ echo "3" > a | |
59 | $ cvscall ci -m "mod a again" |
|
59 | $ cvscall ci -m "mod a again" | |
60 | cvs commit: Examining . |
|
60 | cvs commit: Examining . | |
61 |
|
61 | |||
62 | Convert |
|
62 | Convert | |
63 |
|
63 | |||
64 | $ cd .. |
|
64 | $ cd .. | |
65 | $ hg convert src |
|
65 | $ hg convert src | |
66 | assuming destination src-hg |
|
66 | assuming destination src-hg | |
67 | initializing destination src-hg repository |
|
67 | initializing destination src-hg repository | |
68 | connecting to $TESTTMP/cvsrepo |
|
68 | connecting to $TESTTMP/cvsrepo | |
69 | scanning source... |
|
69 | scanning source... | |
70 | collecting CVS rlog |
|
70 | collecting CVS rlog | |
71 | 7 log entries |
|
71 | 7 log entries | |
72 | creating changesets |
|
72 | creating changesets | |
73 | 5 changeset entries |
|
73 | 5 changeset entries | |
74 | sorting... |
|
74 | sorting... | |
75 | converting... |
|
75 | converting... | |
76 | 4 Initial revision |
|
76 | 4 Initial revision | |
77 | 3 init |
|
77 | 3 init | |
78 | 2 mod a |
|
78 | 2 mod a | |
79 | 1 mod b |
|
79 | 1 mod b | |
80 | 0 mod a again |
|
80 | 0 mod a again | |
81 | updating tags |
|
81 | updating tags | |
82 |
|
82 | |||
83 | Check the result |
|
83 | Check the result | |
84 |
|
84 | |||
85 | $ hg -R src-hg log -G --template '{rev} ({branches}) {desc} files: {files}\n' |
|
85 | $ hg -R src-hg log -G --template '{rev} ({branches}) {desc} files: {files}\n' | |
86 | o 5 () update tags files: .hgtags |
|
86 | o 5 () update tags files: .hgtags | |
87 | | |
|
87 | | | |
88 | | o 4 (BRANCH) mod a again files: a |
|
88 | | o 4 (BRANCH) mod a again files: a | |
89 | | | |
|
89 | | | | |
90 | | o 3 (BRANCH) mod b files: b |
|
90 | | o 3 (BRANCH) mod b files: b | |
91 | | | |
|
91 | | | | |
92 | | o 2 (BRANCH) mod a files: a |
|
92 | | o 2 (BRANCH) mod a files: a | |
93 | | | |
|
93 | | | | |
94 | | o 1 (v0) init files: |
|
94 | | o 1 (v0) init files: | |
95 | |/ |
|
95 | |/ | |
96 | o 0 () Initial revision files: a b |
|
96 | o 0 () Initial revision files: a b | |
97 |
|
97 | |||
98 |
|
98 | |||
99 |
|
99 | |||
100 | issue 1447 |
|
100 | issue 1447 | |
101 |
|
101 | |||
102 | $ cvscall() |
|
102 | $ cvscall() | |
103 | > { |
|
103 | > { | |
104 | > cvs -f "$@" > /dev/null |
|
104 | > cvs -f "$@" > /dev/null | |
105 | > sleep 1 |
|
105 | > sleep 1 | |
106 | > } |
|
106 | > } | |
107 | $ cvsci() |
|
107 | $ cvsci() | |
108 | > { |
|
108 | > { | |
109 | > cvs -f ci "$@" >/dev/null |
|
109 | > cvs -f ci "$@" >/dev/null | |
110 | > sleep 1 |
|
110 | > sleep 1 | |
111 | > } |
|
111 | > } | |
112 | $ cvscall -Q -d `pwd`/cvsmaster2 init |
|
112 | $ cvscall -Q -d `pwd`/cvsmaster2 init | |
113 | $ cd cvsmaster2 |
|
113 | $ cd cvsmaster2 | |
114 | $ CVSROOT=`pwd` |
|
114 | $ CVSROOT=`pwd` | |
115 | $ export CVSROOT |
|
115 | $ export CVSROOT | |
116 | $ mkdir foo |
|
116 | $ mkdir foo | |
117 | $ cd .. |
|
117 | $ cd .. | |
118 | $ cvscall -Q co -d cvswork2 foo |
|
118 | $ cvscall -Q co -d cvswork2 foo | |
119 | $ cd cvswork2 |
|
119 | $ cd cvswork2 | |
120 | $ echo foo > a.txt |
|
120 | $ echo foo > a.txt | |
121 | $ echo bar > b.txt |
|
121 | $ echo bar > b.txt | |
122 | $ cvscall -Q add a.txt b.txt |
|
122 | $ cvscall -Q add a.txt b.txt | |
123 | $ cvsci -m "Initial commit" |
|
123 | $ cvsci -m "Initial commit" | |
124 | cvs commit: Examining . |
|
124 | cvs commit: Examining . | |
125 | $ echo foo > b.txt |
|
125 | $ echo foo > b.txt | |
126 | $ cvsci -m "Fix b on HEAD" |
|
126 | $ cvsci -m "Fix b on HEAD" | |
127 | cvs commit: Examining . |
|
127 | cvs commit: Examining . | |
128 | $ echo bar > a.txt |
|
128 | $ echo bar > a.txt | |
129 | $ cvsci -m "Small fix in a on HEAD" |
|
129 | $ cvsci -m "Small fix in a on HEAD" | |
130 | cvs commit: Examining . |
|
130 | cvs commit: Examining . | |
131 | $ cvscall -Q tag -b BRANCH |
|
131 | $ cvscall -Q tag -b BRANCH | |
132 | $ cvscall -Q up -P -rBRANCH |
|
132 | $ cvscall -Q up -P -rBRANCH | |
133 | $ echo baz > b.txt |
|
133 | $ echo baz > b.txt | |
134 | $ cvsci -m "Change on BRANCH in b" |
|
134 | $ cvsci -m "Change on BRANCH in b" | |
135 | cvs commit: Examining . |
|
135 | cvs commit: Examining . | |
136 | $ hg debugcvsps -x --parents foo |
|
136 | $ hg debugcvsps -x --parents foo | |
137 | collecting CVS rlog |
|
137 | collecting CVS rlog | |
138 | 5 log entries |
|
138 | 5 log entries | |
139 | creating changesets |
|
139 | creating changesets | |
140 | 4 changeset entries |
|
140 | 4 changeset entries | |
141 | --------------------- |
|
141 | --------------------- | |
142 | PatchSet 1 |
|
142 | PatchSet 1 | |
143 | Date: * (glob) |
|
143 | Date: * (glob) | |
144 | Author: * (glob) |
|
144 | Author: * (glob) | |
145 | Branch: HEAD |
|
145 | Branch: HEAD | |
146 | Tag: (none) |
|
146 | Tag: (none) | |
147 | Log: |
|
147 | Log: | |
148 | Initial commit |
|
148 | Initial commit | |
149 |
|
149 | |||
150 | Members: |
|
150 | Members: | |
151 | a.txt:INITIAL->1.1 |
|
151 | a.txt:INITIAL->1.1 | |
152 | b.txt:INITIAL->1.1 |
|
152 | b.txt:INITIAL->1.1 | |
153 |
|
153 | |||
154 | --------------------- |
|
154 | --------------------- | |
155 | PatchSet 2 |
|
155 | PatchSet 2 | |
156 | Date: * (glob) |
|
156 | Date: * (glob) | |
157 | Author: * (glob) |
|
157 | Author: * (glob) | |
158 | Branch: HEAD |
|
158 | Branch: HEAD | |
159 | Tag: (none) |
|
159 | Tag: (none) | |
160 | Branchpoints: BRANCH |
|
160 | Branchpoints: BRANCH | |
161 | Parent: 1 |
|
161 | Parent: 1 | |
162 | Log: |
|
162 | Log: | |
163 | Fix b on HEAD |
|
163 | Fix b on HEAD | |
164 |
|
164 | |||
165 | Members: |
|
165 | Members: | |
166 | b.txt:1.1->1.2 |
|
166 | b.txt:1.1->1.2 | |
167 |
|
167 | |||
168 | --------------------- |
|
168 | --------------------- | |
169 | PatchSet 3 |
|
169 | PatchSet 3 | |
170 | Date: * (glob) |
|
170 | Date: * (glob) | |
171 | Author: * (glob) |
|
171 | Author: * (glob) | |
172 | Branch: HEAD |
|
172 | Branch: HEAD | |
173 | Tag: (none) |
|
173 | Tag: (none) | |
174 | Branchpoints: BRANCH |
|
174 | Branchpoints: BRANCH | |
175 | Parent: 2 |
|
175 | Parent: 2 | |
176 | Log: |
|
176 | Log: | |
177 | Small fix in a on HEAD |
|
177 | Small fix in a on HEAD | |
178 |
|
178 | |||
179 | Members: |
|
179 | Members: | |
180 | a.txt:1.1->1.2 |
|
180 | a.txt:1.1->1.2 | |
181 |
|
181 | |||
182 | --------------------- |
|
182 | --------------------- | |
183 | PatchSet 4 |
|
183 | PatchSet 4 | |
184 | Date: * (glob) |
|
184 | Date: * (glob) | |
185 | Author: * (glob) |
|
185 | Author: * (glob) | |
186 | Branch: BRANCH |
|
186 | Branch: BRANCH | |
187 | Tag: (none) |
|
187 | Tag: (none) | |
188 | Parent: 3 |
|
188 | Parent: 3 | |
189 | Log: |
|
189 | Log: | |
190 | Change on BRANCH in b |
|
190 | Change on BRANCH in b | |
191 |
|
191 | |||
192 | Members: |
|
192 | Members: | |
193 | b.txt:1.2->1.2.2.1 |
|
193 | b.txt:1.2->1.2.2.1 | |
194 |
|
194 | |||
195 |
|
195 | |||
196 | $ cd .. |
|
196 | $ cd .. |
@@ -1,234 +1,234 b'' | |||||
1 | #require cvs |
|
1 | #require cvs no-root | |
2 |
|
2 | |||
3 | Test config convert.cvsps.mergefrom config setting. |
|
3 | Test config convert.cvsps.mergefrom config setting. | |
4 | (Should test similar mergeto feature, but I don't understand it yet.) |
|
4 | (Should test similar mergeto feature, but I don't understand it yet.) | |
5 | Requires builtin cvsps. |
|
5 | Requires builtin cvsps. | |
6 |
|
6 | |||
7 | $ CVSROOT=`pwd`/cvsrepo |
|
7 | $ CVSROOT=`pwd`/cvsrepo | |
8 | $ export CVSROOT |
|
8 | $ export CVSROOT | |
9 |
|
9 | |||
10 | $ cvscall() |
|
10 | $ cvscall() | |
11 | > { |
|
11 | > { | |
12 | > cvs -f "$@" |
|
12 | > cvs -f "$@" | |
13 | > } |
|
13 | > } | |
14 |
|
14 | |||
15 | output of 'cvs ci' varies unpredictably, so just discard it |
|
15 | output of 'cvs ci' varies unpredictably, so just discard it | |
16 | XXX copied from test-convert-cvs-synthetic |
|
16 | XXX copied from test-convert-cvs-synthetic | |
17 |
|
17 | |||
18 | $ cvsci() |
|
18 | $ cvsci() | |
19 | > { |
|
19 | > { | |
20 | > sleep 1 |
|
20 | > sleep 1 | |
21 | > cvs -f ci "$@" > /dev/null |
|
21 | > cvs -f ci "$@" > /dev/null | |
22 | > } |
|
22 | > } | |
23 |
|
23 | |||
24 | XXX copied from test-convert-cvs-synthetic |
|
24 | XXX copied from test-convert-cvs-synthetic | |
25 |
|
25 | |||
26 | $ cat <<EOF >> $HGRCPATH |
|
26 | $ cat <<EOF >> $HGRCPATH | |
27 | > [extensions] |
|
27 | > [extensions] | |
28 | > convert = |
|
28 | > convert = | |
29 | > [convert] |
|
29 | > [convert] | |
30 | > cvsps.cache = 0 |
|
30 | > cvsps.cache = 0 | |
31 | > cvsps.mergefrom = \[MERGE from (\S+)\] |
|
31 | > cvsps.mergefrom = \[MERGE from (\S+)\] | |
32 | > EOF |
|
32 | > EOF | |
33 |
|
33 | |||
34 | create cvs repository with one project |
|
34 | create cvs repository with one project | |
35 |
|
35 | |||
36 | $ cvscall -q -d "$CVSROOT" init |
|
36 | $ cvscall -q -d "$CVSROOT" init | |
37 | $ mkdir cvsrepo/proj |
|
37 | $ mkdir cvsrepo/proj | |
38 |
|
38 | |||
39 | populate cvs repository |
|
39 | populate cvs repository | |
40 |
|
40 | |||
41 | $ cvscall -Q co proj |
|
41 | $ cvscall -Q co proj | |
42 | $ cd proj |
|
42 | $ cd proj | |
43 | $ touch file1 |
|
43 | $ touch file1 | |
44 | $ cvscall -Q add file1 |
|
44 | $ cvscall -Q add file1 | |
45 | $ cvsci -m"add file1 on trunk" |
|
45 | $ cvsci -m"add file1 on trunk" | |
46 | cvs commit: Examining . |
|
46 | cvs commit: Examining . | |
47 |
|
47 | |||
48 | create two release branches |
|
48 | create two release branches | |
49 |
|
49 | |||
50 | $ cvscall -q tag -b v1_0 |
|
50 | $ cvscall -q tag -b v1_0 | |
51 | T file1 |
|
51 | T file1 | |
52 | $ cvscall -q tag -b v1_1 |
|
52 | $ cvscall -q tag -b v1_1 | |
53 | T file1 |
|
53 | T file1 | |
54 |
|
54 | |||
55 | modify file1 on branch v1_0 |
|
55 | modify file1 on branch v1_0 | |
56 |
|
56 | |||
57 | $ cvscall -Q update -rv1_0 |
|
57 | $ cvscall -Q update -rv1_0 | |
58 | $ sleep 1 |
|
58 | $ sleep 1 | |
59 | $ echo "change" >> file1 |
|
59 | $ echo "change" >> file1 | |
60 | $ cvsci -m"add text" |
|
60 | $ cvsci -m"add text" | |
61 | cvs commit: Examining . |
|
61 | cvs commit: Examining . | |
62 |
|
62 | |||
63 | make unrelated change on v1_1 |
|
63 | make unrelated change on v1_1 | |
64 |
|
64 | |||
65 | $ cvscall -Q update -rv1_1 |
|
65 | $ cvscall -Q update -rv1_1 | |
66 | $ touch unrelated |
|
66 | $ touch unrelated | |
67 | $ cvscall -Q add unrelated |
|
67 | $ cvscall -Q add unrelated | |
68 | $ cvsci -m"unrelated change" |
|
68 | $ cvsci -m"unrelated change" | |
69 | cvs commit: Examining . |
|
69 | cvs commit: Examining . | |
70 |
|
70 | |||
71 | merge file1 to v1_1 |
|
71 | merge file1 to v1_1 | |
72 |
|
72 | |||
73 | $ cvscall -Q update -jv1_0 |
|
73 | $ cvscall -Q update -jv1_0 | |
74 | RCS file: $TESTTMP/cvsrepo/proj/file1,v |
|
74 | RCS file: $TESTTMP/cvsrepo/proj/file1,v | |
75 | retrieving revision 1.1 |
|
75 | retrieving revision 1.1 | |
76 | retrieving revision 1.1.2.1 |
|
76 | retrieving revision 1.1.2.1 | |
77 | Merging differences between 1.1 and 1.1.2.1 into file1 |
|
77 | Merging differences between 1.1 and 1.1.2.1 into file1 | |
78 | $ cvsci -m"add text [MERGE from v1_0]" |
|
78 | $ cvsci -m"add text [MERGE from v1_0]" | |
79 | cvs commit: Examining . |
|
79 | cvs commit: Examining . | |
80 |
|
80 | |||
81 | merge change to trunk |
|
81 | merge change to trunk | |
82 |
|
82 | |||
83 | $ cvscall -Q update -A |
|
83 | $ cvscall -Q update -A | |
84 | $ cvscall -Q update -jv1_1 |
|
84 | $ cvscall -Q update -jv1_1 | |
85 | RCS file: $TESTTMP/cvsrepo/proj/file1,v |
|
85 | RCS file: $TESTTMP/cvsrepo/proj/file1,v | |
86 | retrieving revision 1.1 |
|
86 | retrieving revision 1.1 | |
87 | retrieving revision 1.1.4.1 |
|
87 | retrieving revision 1.1.4.1 | |
88 | Merging differences between 1.1 and 1.1.4.1 into file1 |
|
88 | Merging differences between 1.1 and 1.1.4.1 into file1 | |
89 | $ cvsci -m"add text [MERGE from v1_1]" |
|
89 | $ cvsci -m"add text [MERGE from v1_1]" | |
90 | cvs commit: Examining . |
|
90 | cvs commit: Examining . | |
91 |
|
91 | |||
92 | non-merged change on trunk |
|
92 | non-merged change on trunk | |
93 |
|
93 | |||
94 | $ echo "foo" > file2 |
|
94 | $ echo "foo" > file2 | |
95 | $ cvscall -Q add file2 |
|
95 | $ cvscall -Q add file2 | |
96 | $ cvsci -m"add file2 on trunk" file2 |
|
96 | $ cvsci -m"add file2 on trunk" file2 | |
97 |
|
97 | |||
98 | this will create rev 1.3 |
|
98 | this will create rev 1.3 | |
99 | change on trunk to backport |
|
99 | change on trunk to backport | |
100 |
|
100 | |||
101 | $ echo "backport me" >> file1 |
|
101 | $ echo "backport me" >> file1 | |
102 | $ cvsci -m"add other text" file1 |
|
102 | $ cvsci -m"add other text" file1 | |
103 | $ cvscall log file1 |
|
103 | $ cvscall log file1 | |
104 |
|
104 | |||
105 | RCS file: $TESTTMP/cvsrepo/proj/file1,v |
|
105 | RCS file: $TESTTMP/cvsrepo/proj/file1,v | |
106 | Working file: file1 |
|
106 | Working file: file1 | |
107 | head: 1.3 |
|
107 | head: 1.3 | |
108 | branch: |
|
108 | branch: | |
109 | locks: strict |
|
109 | locks: strict | |
110 | access list: |
|
110 | access list: | |
111 | symbolic names: |
|
111 | symbolic names: | |
112 | v1_1: 1.1.0.4 |
|
112 | v1_1: 1.1.0.4 | |
113 | v1_0: 1.1.0.2 |
|
113 | v1_0: 1.1.0.2 | |
114 | keyword substitution: kv |
|
114 | keyword substitution: kv | |
115 | total revisions: 5; selected revisions: 5 |
|
115 | total revisions: 5; selected revisions: 5 | |
116 | description: |
|
116 | description: | |
117 | ---------------------------- |
|
117 | ---------------------------- | |
118 | revision 1.3 |
|
118 | revision 1.3 | |
119 | date: * (glob) |
|
119 | date: * (glob) | |
120 | add other text |
|
120 | add other text | |
121 | ---------------------------- |
|
121 | ---------------------------- | |
122 | revision 1.2 |
|
122 | revision 1.2 | |
123 | date: * (glob) |
|
123 | date: * (glob) | |
124 | add text [MERGE from v1_1] |
|
124 | add text [MERGE from v1_1] | |
125 | ---------------------------- |
|
125 | ---------------------------- | |
126 | revision 1.1 |
|
126 | revision 1.1 | |
127 | date: * (glob) |
|
127 | date: * (glob) | |
128 | branches: 1.1.2; 1.1.4; |
|
128 | branches: 1.1.2; 1.1.4; | |
129 | add file1 on trunk |
|
129 | add file1 on trunk | |
130 | ---------------------------- |
|
130 | ---------------------------- | |
131 | revision 1.1.4.1 |
|
131 | revision 1.1.4.1 | |
132 | date: * (glob) |
|
132 | date: * (glob) | |
133 | add text [MERGE from v1_0] |
|
133 | add text [MERGE from v1_0] | |
134 | ---------------------------- |
|
134 | ---------------------------- | |
135 | revision 1.1.2.1 |
|
135 | revision 1.1.2.1 | |
136 | date: * (glob) |
|
136 | date: * (glob) | |
137 | add text |
|
137 | add text | |
138 | ============================================================================= |
|
138 | ============================================================================= | |
139 |
|
139 | |||
140 | XXX how many ways are there to spell "trunk" with CVS? |
|
140 | XXX how many ways are there to spell "trunk" with CVS? | |
141 | backport trunk change to v1_1 |
|
141 | backport trunk change to v1_1 | |
142 |
|
142 | |||
143 | $ cvscall -Q update -rv1_1 |
|
143 | $ cvscall -Q update -rv1_1 | |
144 | $ cvscall -Q update -j1.2 -j1.3 file1 |
|
144 | $ cvscall -Q update -j1.2 -j1.3 file1 | |
145 | RCS file: $TESTTMP/cvsrepo/proj/file1,v |
|
145 | RCS file: $TESTTMP/cvsrepo/proj/file1,v | |
146 | retrieving revision 1.2 |
|
146 | retrieving revision 1.2 | |
147 | retrieving revision 1.3 |
|
147 | retrieving revision 1.3 | |
148 | Merging differences between 1.2 and 1.3 into file1 |
|
148 | Merging differences between 1.2 and 1.3 into file1 | |
149 | $ cvsci -m"add other text [MERGE from HEAD]" file1 |
|
149 | $ cvsci -m"add other text [MERGE from HEAD]" file1 | |
150 |
|
150 | |||
151 | fix bug on v1_1, merge to trunk with error |
|
151 | fix bug on v1_1, merge to trunk with error | |
152 |
|
152 | |||
153 | $ cvscall -Q update -rv1_1 |
|
153 | $ cvscall -Q update -rv1_1 | |
154 | $ echo "merge forward" >> file1 |
|
154 | $ echo "merge forward" >> file1 | |
155 | $ cvscall -Q tag unmerged |
|
155 | $ cvscall -Q tag unmerged | |
156 | $ cvsci -m"fix file1" |
|
156 | $ cvsci -m"fix file1" | |
157 | cvs commit: Examining . |
|
157 | cvs commit: Examining . | |
158 | $ cvscall -Q update -A |
|
158 | $ cvscall -Q update -A | |
159 | $ cvscall -Q update -junmerged -jv1_1 |
|
159 | $ cvscall -Q update -junmerged -jv1_1 | |
160 | RCS file: $TESTTMP/cvsrepo/proj/file1,v |
|
160 | RCS file: $TESTTMP/cvsrepo/proj/file1,v | |
161 | retrieving revision 1.1.4.2 |
|
161 | retrieving revision 1.1.4.2 | |
162 | retrieving revision 1.1.4.3 |
|
162 | retrieving revision 1.1.4.3 | |
163 | Merging differences between 1.1.4.2 and 1.1.4.3 into file1 |
|
163 | Merging differences between 1.1.4.2 and 1.1.4.3 into file1 | |
164 |
|
164 | |||
165 | note the typo in the commit log message |
|
165 | note the typo in the commit log message | |
166 |
|
166 | |||
167 | $ cvsci -m"fix file1 [MERGE from v1-1]" |
|
167 | $ cvsci -m"fix file1 [MERGE from v1-1]" | |
168 | cvs commit: Examining . |
|
168 | cvs commit: Examining . | |
169 | $ cvs -Q tag -d unmerged |
|
169 | $ cvs -Q tag -d unmerged | |
170 |
|
170 | |||
171 | convert to hg |
|
171 | convert to hg | |
172 |
|
172 | |||
173 | $ cd .. |
|
173 | $ cd .. | |
174 | $ hg convert proj proj.hg |
|
174 | $ hg convert proj proj.hg | |
175 | initializing destination proj.hg repository |
|
175 | initializing destination proj.hg repository | |
176 | connecting to $TESTTMP/cvsrepo |
|
176 | connecting to $TESTTMP/cvsrepo | |
177 | scanning source... |
|
177 | scanning source... | |
178 | collecting CVS rlog |
|
178 | collecting CVS rlog | |
179 | 12 log entries |
|
179 | 12 log entries | |
180 | creating changesets |
|
180 | creating changesets | |
181 | warning: CVS commit message references non-existent branch 'v1-1': |
|
181 | warning: CVS commit message references non-existent branch 'v1-1': | |
182 | fix file1 [MERGE from v1-1] |
|
182 | fix file1 [MERGE from v1-1] | |
183 | 10 changeset entries |
|
183 | 10 changeset entries | |
184 | sorting... |
|
184 | sorting... | |
185 | converting... |
|
185 | converting... | |
186 | 9 add file1 on trunk |
|
186 | 9 add file1 on trunk | |
187 | 8 unrelated change |
|
187 | 8 unrelated change | |
188 | 7 add text |
|
188 | 7 add text | |
189 | 6 add text [MERGE from v1_0] |
|
189 | 6 add text [MERGE from v1_0] | |
190 | 5 add text [MERGE from v1_1] |
|
190 | 5 add text [MERGE from v1_1] | |
191 | 4 add file2 on trunk |
|
191 | 4 add file2 on trunk | |
192 | 3 add other text |
|
192 | 3 add other text | |
193 | 2 add other text [MERGE from HEAD] |
|
193 | 2 add other text [MERGE from HEAD] | |
194 | 1 fix file1 |
|
194 | 1 fix file1 | |
195 | 0 fix file1 [MERGE from v1-1] |
|
195 | 0 fix file1 [MERGE from v1-1] | |
196 |
|
196 | |||
197 | complete log |
|
197 | complete log | |
198 |
|
198 | |||
199 | $ template="{rev}: '{branches}' {desc}\n" |
|
199 | $ template="{rev}: '{branches}' {desc}\n" | |
200 | $ hg -R proj.hg log --template="$template" |
|
200 | $ hg -R proj.hg log --template="$template" | |
201 | 9: '' fix file1 [MERGE from v1-1] |
|
201 | 9: '' fix file1 [MERGE from v1-1] | |
202 | 8: 'v1_1' fix file1 |
|
202 | 8: 'v1_1' fix file1 | |
203 | 7: 'v1_1' add other text [MERGE from HEAD] |
|
203 | 7: 'v1_1' add other text [MERGE from HEAD] | |
204 | 6: '' add other text |
|
204 | 6: '' add other text | |
205 | 5: '' add file2 on trunk |
|
205 | 5: '' add file2 on trunk | |
206 | 4: '' add text [MERGE from v1_1] |
|
206 | 4: '' add text [MERGE from v1_1] | |
207 | 3: 'v1_1' add text [MERGE from v1_0] |
|
207 | 3: 'v1_1' add text [MERGE from v1_0] | |
208 | 2: 'v1_0' add text |
|
208 | 2: 'v1_0' add text | |
209 | 1: 'v1_1' unrelated change |
|
209 | 1: 'v1_1' unrelated change | |
210 | 0: '' add file1 on trunk |
|
210 | 0: '' add file1 on trunk | |
211 |
|
211 | |||
212 | graphical log |
|
212 | graphical log | |
213 |
|
213 | |||
214 | $ hg -R proj.hg log -G --template="$template" |
|
214 | $ hg -R proj.hg log -G --template="$template" | |
215 | o 9: '' fix file1 [MERGE from v1-1] |
|
215 | o 9: '' fix file1 [MERGE from v1-1] | |
216 | | |
|
216 | | | |
217 | | o 8: 'v1_1' fix file1 |
|
217 | | o 8: 'v1_1' fix file1 | |
218 | | | |
|
218 | | | | |
219 | | o 7: 'v1_1' add other text [MERGE from HEAD] |
|
219 | | o 7: 'v1_1' add other text [MERGE from HEAD] | |
220 | |/| |
|
220 | |/| | |
221 | o | 6: '' add other text |
|
221 | o | 6: '' add other text | |
222 | | | |
|
222 | | | | |
223 | o | 5: '' add file2 on trunk |
|
223 | o | 5: '' add file2 on trunk | |
224 | | | |
|
224 | | | | |
225 | o | 4: '' add text [MERGE from v1_1] |
|
225 | o | 4: '' add text [MERGE from v1_1] | |
226 | |\| |
|
226 | |\| | |
227 | | o 3: 'v1_1' add text [MERGE from v1_0] |
|
227 | | o 3: 'v1_1' add text [MERGE from v1_0] | |
228 | | |\ |
|
228 | | |\ | |
229 | +---o 2: 'v1_0' add text |
|
229 | +---o 2: 'v1_0' add text | |
230 | | | |
|
230 | | | | |
231 | | o 1: 'v1_1' unrelated change |
|
231 | | o 1: 'v1_1' unrelated change | |
232 | |/ |
|
232 | |/ | |
233 | o 0: '' add file1 on trunk |
|
233 | o 0: '' add file1 on trunk | |
234 |
|
234 |
@@ -1,224 +1,224 b'' | |||||
1 | #require cvs112 |
|
1 | #require cvs112 no-root | |
2 |
|
2 | |||
3 | This feature requires use of builtin cvsps! |
|
3 | This feature requires use of builtin cvsps! | |
4 |
|
4 | |||
5 | $ echo "[extensions]" >> $HGRCPATH |
|
5 | $ echo "[extensions]" >> $HGRCPATH | |
6 | $ echo "convert = " >> $HGRCPATH |
|
6 | $ echo "convert = " >> $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 | $ rmdir cvsrepo |
|
17 | $ rmdir cvsrepo | |
18 | $ cvscall() |
|
18 | $ cvscall() | |
19 | > { |
|
19 | > { | |
20 | > cvs -f "$@" |
|
20 | > cvs -f "$@" | |
21 | > } |
|
21 | > } | |
22 |
|
22 | |||
23 | output of 'cvs ci' varies unpredictably, so just discard it |
|
23 | output of 'cvs ci' varies unpredictably, so just discard it | |
24 |
|
24 | |||
25 | $ cvsci() |
|
25 | $ cvsci() | |
26 | > { |
|
26 | > { | |
27 | > sleep 1 |
|
27 | > sleep 1 | |
28 | > cvs -f ci "$@" >/dev/null |
|
28 | > cvs -f ci "$@" >/dev/null | |
29 | > } |
|
29 | > } | |
30 | $ cvscall -d "$CVSROOT" init |
|
30 | $ cvscall -d "$CVSROOT" init | |
31 | $ mkdir cvsrepo/proj |
|
31 | $ mkdir cvsrepo/proj | |
32 | $ cvscall -q co proj |
|
32 | $ cvscall -q co proj | |
33 |
|
33 | |||
34 | create file1 on the trunk |
|
34 | create file1 on the trunk | |
35 |
|
35 | |||
36 | $ cd proj |
|
36 | $ cd proj | |
37 | $ touch file1 |
|
37 | $ touch file1 | |
38 | $ cvscall -Q add file1 |
|
38 | $ cvscall -Q add file1 | |
39 | $ cvsci -m"add file1 on trunk" file1 |
|
39 | $ cvsci -m"add file1 on trunk" file1 | |
40 |
|
40 | |||
41 | create two branches |
|
41 | create two branches | |
42 |
|
42 | |||
43 | $ cvscall -q tag -b v1_0 |
|
43 | $ cvscall -q tag -b v1_0 | |
44 | T file1 |
|
44 | T file1 | |
45 | $ cvscall -q tag -b v1_1 |
|
45 | $ cvscall -q tag -b v1_1 | |
46 | T file1 |
|
46 | T file1 | |
47 |
|
47 | |||
48 | create file2 on branch v1_0 |
|
48 | create file2 on branch v1_0 | |
49 |
|
49 | |||
50 | $ cvscall -Q up -rv1_0 |
|
50 | $ cvscall -Q up -rv1_0 | |
51 | $ touch file2 |
|
51 | $ touch file2 | |
52 | $ cvscall -Q add file2 |
|
52 | $ cvscall -Q add file2 | |
53 | $ cvsci -m"add file2" file2 |
|
53 | $ cvsci -m"add file2" file2 | |
54 |
|
54 | |||
55 | create file3, file4 on branch v1_1 |
|
55 | create file3, file4 on branch v1_1 | |
56 |
|
56 | |||
57 | $ cvscall -Q up -rv1_1 |
|
57 | $ cvscall -Q up -rv1_1 | |
58 | $ touch file3 |
|
58 | $ touch file3 | |
59 | $ touch file4 |
|
59 | $ touch file4 | |
60 | $ cvscall -Q add file3 file4 |
|
60 | $ cvscall -Q add file3 file4 | |
61 | $ cvsci -m"add file3, file4 on branch v1_1" file3 file4 |
|
61 | $ cvsci -m"add file3, file4 on branch v1_1" file3 file4 | |
62 |
|
62 | |||
63 | merge file2 from v1_0 to v1_1 |
|
63 | merge file2 from v1_0 to v1_1 | |
64 |
|
64 | |||
65 | $ cvscall -Q up -jv1_0 |
|
65 | $ cvscall -Q up -jv1_0 | |
66 | $ cvsci -m"MERGE from v1_0: add file2" |
|
66 | $ cvsci -m"MERGE from v1_0: add file2" | |
67 | cvs commit: Examining . |
|
67 | cvs commit: Examining . | |
68 |
|
68 | |||
69 | Step things up a notch: now we make the history really hairy, with |
|
69 | Step things up a notch: now we make the history really hairy, with | |
70 | changes bouncing back and forth between trunk and v1_2 and merges |
|
70 | changes bouncing back and forth between trunk and v1_2 and merges | |
71 | going both ways. (I.e., try to model the real world.) |
|
71 | going both ways. (I.e., try to model the real world.) | |
72 | create branch v1_2 |
|
72 | create branch v1_2 | |
73 |
|
73 | |||
74 | $ cvscall -Q up -A |
|
74 | $ cvscall -Q up -A | |
75 | $ cvscall -q tag -b v1_2 |
|
75 | $ cvscall -q tag -b v1_2 | |
76 | T file1 |
|
76 | T file1 | |
77 |
|
77 | |||
78 | create file5 on branch v1_2 |
|
78 | create file5 on branch v1_2 | |
79 |
|
79 | |||
80 | $ cvscall -Q up -rv1_2 |
|
80 | $ cvscall -Q up -rv1_2 | |
81 | $ touch file5 |
|
81 | $ touch file5 | |
82 | $ cvs -Q add file5 |
|
82 | $ cvs -Q add file5 | |
83 | $ cvsci -m"add file5 on v1_2" |
|
83 | $ cvsci -m"add file5 on v1_2" | |
84 | cvs commit: Examining . |
|
84 | cvs commit: Examining . | |
85 |
|
85 | |||
86 | create file6 on trunk post-v1_2 |
|
86 | create file6 on trunk post-v1_2 | |
87 |
|
87 | |||
88 | $ cvscall -Q up -A |
|
88 | $ cvscall -Q up -A | |
89 | $ touch file6 |
|
89 | $ touch file6 | |
90 | $ cvscall -Q add file6 |
|
90 | $ cvscall -Q add file6 | |
91 | $ cvsci -m"add file6 on trunk post-v1_2" |
|
91 | $ cvsci -m"add file6 on trunk post-v1_2" | |
92 | cvs commit: Examining . |
|
92 | cvs commit: Examining . | |
93 |
|
93 | |||
94 | merge file5 from v1_2 to trunk |
|
94 | merge file5 from v1_2 to trunk | |
95 |
|
95 | |||
96 | $ cvscall -Q up -A |
|
96 | $ cvscall -Q up -A | |
97 | $ cvscall -Q up -jv1_2 file5 |
|
97 | $ cvscall -Q up -jv1_2 file5 | |
98 | $ cvsci -m"MERGE from v1_2: add file5" |
|
98 | $ cvsci -m"MERGE from v1_2: add file5" | |
99 | cvs commit: Examining . |
|
99 | cvs commit: Examining . | |
100 |
|
100 | |||
101 | merge file6 from trunk to v1_2 |
|
101 | merge file6 from trunk to v1_2 | |
102 |
|
102 | |||
103 | $ cvscall -Q up -rv1_2 |
|
103 | $ cvscall -Q up -rv1_2 | |
104 | $ cvscall up -jHEAD file6 |
|
104 | $ cvscall up -jHEAD file6 | |
105 | U file6 |
|
105 | U file6 | |
106 | $ cvsci -m"MERGE from HEAD: add file6" |
|
106 | $ cvsci -m"MERGE from HEAD: add file6" | |
107 | cvs commit: Examining . |
|
107 | cvs commit: Examining . | |
108 |
|
108 | |||
109 | cvs rlog output |
|
109 | cvs rlog output | |
110 |
|
110 | |||
111 | $ cvscall -q rlog proj | egrep '^(RCS file|revision)' |
|
111 | $ cvscall -q rlog proj | egrep '^(RCS file|revision)' | |
112 | RCS file: $TESTTMP/cvsrepo/proj/file1,v |
|
112 | RCS file: $TESTTMP/cvsrepo/proj/file1,v | |
113 | revision 1.1 |
|
113 | revision 1.1 | |
114 | RCS file: $TESTTMP/cvsrepo/proj/Attic/file2,v |
|
114 | RCS file: $TESTTMP/cvsrepo/proj/Attic/file2,v | |
115 | revision 1.1 |
|
115 | revision 1.1 | |
116 | revision 1.1.4.2 |
|
116 | revision 1.1.4.2 | |
117 | revision 1.1.4.1 |
|
117 | revision 1.1.4.1 | |
118 | revision 1.1.2.1 |
|
118 | revision 1.1.2.1 | |
119 | RCS file: $TESTTMP/cvsrepo/proj/Attic/file3,v |
|
119 | RCS file: $TESTTMP/cvsrepo/proj/Attic/file3,v | |
120 | revision 1.1 |
|
120 | revision 1.1 | |
121 | revision 1.1.2.1 |
|
121 | revision 1.1.2.1 | |
122 | RCS file: $TESTTMP/cvsrepo/proj/Attic/file4,v |
|
122 | RCS file: $TESTTMP/cvsrepo/proj/Attic/file4,v | |
123 | revision 1.1 |
|
123 | revision 1.1 | |
124 | revision 1.1.2.1 |
|
124 | revision 1.1.2.1 | |
125 | RCS file: $TESTTMP/cvsrepo/proj/file5,v |
|
125 | RCS file: $TESTTMP/cvsrepo/proj/file5,v | |
126 | revision 1.2 |
|
126 | revision 1.2 | |
127 | revision 1.1 |
|
127 | revision 1.1 | |
128 | revision 1.1.2.1 |
|
128 | revision 1.1.2.1 | |
129 | RCS file: $TESTTMP/cvsrepo/proj/file6,v |
|
129 | RCS file: $TESTTMP/cvsrepo/proj/file6,v | |
130 | revision 1.1 |
|
130 | revision 1.1 | |
131 | revision 1.1.2.2 |
|
131 | revision 1.1.2.2 | |
132 | revision 1.1.2.1 |
|
132 | revision 1.1.2.1 | |
133 |
|
133 | |||
134 | convert to hg (#1) |
|
134 | convert to hg (#1) | |
135 |
|
135 | |||
136 | $ cd .. |
|
136 | $ cd .. | |
137 | $ hg convert --datesort proj proj.hg |
|
137 | $ hg convert --datesort proj proj.hg | |
138 | initializing destination proj.hg repository |
|
138 | initializing destination proj.hg repository | |
139 | connecting to $TESTTMP/cvsrepo |
|
139 | connecting to $TESTTMP/cvsrepo | |
140 | scanning source... |
|
140 | scanning source... | |
141 | collecting CVS rlog |
|
141 | collecting CVS rlog | |
142 | 15 log entries |
|
142 | 15 log entries | |
143 | creating changesets |
|
143 | creating changesets | |
144 | 9 changeset entries |
|
144 | 9 changeset entries | |
145 | sorting... |
|
145 | sorting... | |
146 | converting... |
|
146 | converting... | |
147 | 8 add file1 on trunk |
|
147 | 8 add file1 on trunk | |
148 | 7 add file2 |
|
148 | 7 add file2 | |
149 | 6 MERGE from v1_0: add file2 |
|
149 | 6 MERGE from v1_0: add file2 | |
150 | 5 file file3 was initially added on branch v1_1. |
|
150 | 5 file file3 was initially added on branch v1_1. | |
151 | 4 add file3, file4 on branch v1_1 |
|
151 | 4 add file3, file4 on branch v1_1 | |
152 | 3 add file5 on v1_2 |
|
152 | 3 add file5 on v1_2 | |
153 | 2 add file6 on trunk post-v1_2 |
|
153 | 2 add file6 on trunk post-v1_2 | |
154 | 1 MERGE from HEAD: add file6 |
|
154 | 1 MERGE from HEAD: add file6 | |
155 | 0 MERGE from v1_2: add file5 |
|
155 | 0 MERGE from v1_2: add file5 | |
156 |
|
156 | |||
157 | hg log -G output (#1) |
|
157 | hg log -G output (#1) | |
158 |
|
158 | |||
159 | $ hg -R proj.hg log -G --template "{rev} {desc}\n" |
|
159 | $ hg -R proj.hg log -G --template "{rev} {desc}\n" | |
160 | o 8 MERGE from v1_2: add file5 |
|
160 | o 8 MERGE from v1_2: add file5 | |
161 | | |
|
161 | | | |
162 | | o 7 MERGE from HEAD: add file6 |
|
162 | | o 7 MERGE from HEAD: add file6 | |
163 | | | |
|
163 | | | | |
164 | o | 6 add file6 on trunk post-v1_2 |
|
164 | o | 6 add file6 on trunk post-v1_2 | |
165 | | | |
|
165 | | | | |
166 | | o 5 add file5 on v1_2 |
|
166 | | o 5 add file5 on v1_2 | |
167 | | | |
|
167 | | | | |
168 | | | o 4 add file3, file4 on branch v1_1 |
|
168 | | | o 4 add file3, file4 on branch v1_1 | |
169 | | | | |
|
169 | | | | | |
170 | o | | 3 file file3 was initially added on branch v1_1. |
|
170 | o | | 3 file file3 was initially added on branch v1_1. | |
171 | |/ / |
|
171 | |/ / | |
172 | | o 2 MERGE from v1_0: add file2 |
|
172 | | o 2 MERGE from v1_0: add file2 | |
173 | |/ |
|
173 | |/ | |
174 | | o 1 add file2 |
|
174 | | o 1 add file2 | |
175 | |/ |
|
175 | |/ | |
176 | o 0 add file1 on trunk |
|
176 | o 0 add file1 on trunk | |
177 |
|
177 | |||
178 |
|
178 | |||
179 | convert to hg (#2: with merge detection) |
|
179 | convert to hg (#2: with merge detection) | |
180 |
|
180 | |||
181 | $ hg convert \ |
|
181 | $ hg convert \ | |
182 | > --config convert.cvsps.mergefrom='"^MERGE from (\S+):"' \ |
|
182 | > --config convert.cvsps.mergefrom='"^MERGE from (\S+):"' \ | |
183 | > --datesort \ |
|
183 | > --datesort \ | |
184 | > proj proj.hg2 |
|
184 | > proj proj.hg2 | |
185 | initializing destination proj.hg2 repository |
|
185 | initializing destination proj.hg2 repository | |
186 | connecting to $TESTTMP/cvsrepo |
|
186 | connecting to $TESTTMP/cvsrepo | |
187 | scanning source... |
|
187 | scanning source... | |
188 | collecting CVS rlog |
|
188 | collecting CVS rlog | |
189 | 15 log entries |
|
189 | 15 log entries | |
190 | creating changesets |
|
190 | creating changesets | |
191 | 9 changeset entries |
|
191 | 9 changeset entries | |
192 | sorting... |
|
192 | sorting... | |
193 | converting... |
|
193 | converting... | |
194 | 8 add file1 on trunk |
|
194 | 8 add file1 on trunk | |
195 | 7 add file2 |
|
195 | 7 add file2 | |
196 | 6 MERGE from v1_0: add file2 |
|
196 | 6 MERGE from v1_0: add file2 | |
197 | 5 file file3 was initially added on branch v1_1. |
|
197 | 5 file file3 was initially added on branch v1_1. | |
198 | 4 add file3, file4 on branch v1_1 |
|
198 | 4 add file3, file4 on branch v1_1 | |
199 | 3 add file5 on v1_2 |
|
199 | 3 add file5 on v1_2 | |
200 | 2 add file6 on trunk post-v1_2 |
|
200 | 2 add file6 on trunk post-v1_2 | |
201 | 1 MERGE from HEAD: add file6 |
|
201 | 1 MERGE from HEAD: add file6 | |
202 | 0 MERGE from v1_2: add file5 |
|
202 | 0 MERGE from v1_2: add file5 | |
203 |
|
203 | |||
204 | hg log -G output (#2) |
|
204 | hg log -G output (#2) | |
205 |
|
205 | |||
206 | $ hg -R proj.hg2 log -G --template "{rev} {desc}\n" |
|
206 | $ hg -R proj.hg2 log -G --template "{rev} {desc}\n" | |
207 | o 8 MERGE from v1_2: add file5 |
|
207 | o 8 MERGE from v1_2: add file5 | |
208 | | |
|
208 | | | |
209 | | o 7 MERGE from HEAD: add file6 |
|
209 | | o 7 MERGE from HEAD: add file6 | |
210 | | | |
|
210 | | | | |
211 | o | 6 add file6 on trunk post-v1_2 |
|
211 | o | 6 add file6 on trunk post-v1_2 | |
212 | | | |
|
212 | | | | |
213 | | o 5 add file5 on v1_2 |
|
213 | | o 5 add file5 on v1_2 | |
214 | | | |
|
214 | | | | |
215 | | | o 4 add file3, file4 on branch v1_1 |
|
215 | | | o 4 add file3, file4 on branch v1_1 | |
216 | | | | |
|
216 | | | | | |
217 | o | | 3 file file3 was initially added on branch v1_1. |
|
217 | o | | 3 file file3 was initially added on branch v1_1. | |
218 | |/ / |
|
218 | |/ / | |
219 | | o 2 MERGE from v1_0: add file2 |
|
219 | | o 2 MERGE from v1_0: add file2 | |
220 | |/ |
|
220 | |/ | |
221 | | o 1 add file2 |
|
221 | | o 1 add file2 | |
222 | |/ |
|
222 | |/ | |
223 | o 0 add file1 on trunk |
|
223 | o 0 add file1 on trunk | |
224 |
|
224 |
@@ -1,659 +1,659 b'' | |||||
1 | #require cvs |
|
1 | #require cvs no-root | |
2 |
|
2 | |||
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 | $ cat > cvshooks.py <<EOF |
|
13 | $ cat > cvshooks.py <<EOF | |
14 | > def cvslog(ui, repo, hooktype, log): |
|
14 | > def cvslog(ui, repo, hooktype, log): | |
15 | > ui.write(b'%s hook: %d entries\n' % (hooktype, len(log))) |
|
15 | > ui.write(b'%s hook: %d entries\n' % (hooktype, len(log))) | |
16 | > |
|
16 | > | |
17 | > def cvschangesets(ui, repo, hooktype, changesets): |
|
17 | > def cvschangesets(ui, repo, hooktype, changesets): | |
18 | > ui.write(b'%s hook: %d changesets\n' % (hooktype, len(changesets))) |
|
18 | > ui.write(b'%s hook: %d changesets\n' % (hooktype, len(changesets))) | |
19 | > EOF |
|
19 | > EOF | |
20 | $ hookpath=`pwd` |
|
20 | $ hookpath=`pwd` | |
21 | $ cat <<EOF >> $HGRCPATH |
|
21 | $ cat <<EOF >> $HGRCPATH | |
22 | > [hooks] |
|
22 | > [hooks] | |
23 | > cvslog = python:$hookpath/cvshooks.py:cvslog |
|
23 | > cvslog = python:$hookpath/cvshooks.py:cvslog | |
24 | > cvschangesets = python:$hookpath/cvshooks.py:cvschangesets |
|
24 | > cvschangesets = python:$hookpath/cvshooks.py:cvschangesets | |
25 | > EOF |
|
25 | > EOF | |
26 |
|
26 | |||
27 | create cvs repository |
|
27 | create cvs repository | |
28 |
|
28 | |||
29 | $ mkdir cvsrepo |
|
29 | $ mkdir cvsrepo | |
30 | $ cd cvsrepo |
|
30 | $ cd cvsrepo | |
31 | $ CVSROOT=`pwd` |
|
31 | $ CVSROOT=`pwd` | |
32 | $ export CVSROOT |
|
32 | $ export CVSROOT | |
33 | $ CVS_OPTIONS=-f |
|
33 | $ CVS_OPTIONS=-f | |
34 | $ export CVS_OPTIONS |
|
34 | $ export CVS_OPTIONS | |
35 | $ cd .. |
|
35 | $ cd .. | |
36 | $ rmdir cvsrepo |
|
36 | $ rmdir cvsrepo | |
37 | $ cvscall -q -d "$CVSROOT" init |
|
37 | $ cvscall -q -d "$CVSROOT" init | |
38 |
|
38 | |||
39 | create source directory |
|
39 | create source directory | |
40 |
|
40 | |||
41 | $ mkdir src-temp |
|
41 | $ mkdir src-temp | |
42 | $ cd src-temp |
|
42 | $ cd src-temp | |
43 | $ echo a > a |
|
43 | $ echo a > a | |
44 | $ mkdir b |
|
44 | $ mkdir b | |
45 | $ cd b |
|
45 | $ cd b | |
46 | $ echo c > c |
|
46 | $ echo c > c | |
47 | $ cd .. |
|
47 | $ cd .. | |
48 |
|
48 | |||
49 | import source directory |
|
49 | import source directory | |
50 |
|
50 | |||
51 | $ cvscall -q import -m import src INITIAL start |
|
51 | $ cvscall -q import -m import src INITIAL start | |
52 | N src/a |
|
52 | N src/a | |
53 | N src/b/c |
|
53 | N src/b/c | |
54 |
|
54 | |||
55 | No conflicts created by this import |
|
55 | No conflicts created by this import | |
56 |
|
56 | |||
57 | $ cd .. |
|
57 | $ cd .. | |
58 |
|
58 | |||
59 | checkout source directory |
|
59 | checkout source directory | |
60 |
|
60 | |||
61 | $ cvscall -q checkout src |
|
61 | $ cvscall -q checkout src | |
62 | U src/a |
|
62 | U src/a | |
63 | U src/b/c |
|
63 | U src/b/c | |
64 |
|
64 | |||
65 | commit a new revision changing b/c |
|
65 | commit a new revision changing b/c | |
66 |
|
66 | |||
67 | $ cd src |
|
67 | $ cd src | |
68 | $ sleep 1 |
|
68 | $ sleep 1 | |
69 | $ echo c >> b/c |
|
69 | $ echo c >> b/c | |
70 | $ cvscall -q commit -mci0 . | grep '<--' |
|
70 | $ cvscall -q commit -mci0 . | grep '<--' | |
71 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) |
|
71 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) | |
72 | $ cd .. |
|
72 | $ cd .. | |
73 |
|
73 | |||
74 | convert fresh repo and also check localtimezone option |
|
74 | convert fresh repo and also check localtimezone option | |
75 |
|
75 | |||
76 | NOTE: This doesn't check all time zones -- it merely determines that |
|
76 | NOTE: This doesn't check all time zones -- it merely determines that | |
77 | the configuration option is taking effect. |
|
77 | the configuration option is taking effect. | |
78 |
|
78 | |||
79 | An arbitrary (U.S.) time zone is used here. TZ=US/Hawaii is selected |
|
79 | An arbitrary (U.S.) time zone is used here. TZ=US/Hawaii is selected | |
80 | since it does not use DST (unlike other U.S. time zones) and is always |
|
80 | since it does not use DST (unlike other U.S. time zones) and is always | |
81 | a fixed difference from UTC. |
|
81 | a fixed difference from UTC. | |
82 |
|
82 | |||
83 | This choice is limited to work on Linux environments. At least on |
|
83 | This choice is limited to work on Linux environments. At least on | |
84 | FreeBSD 11 this timezone is not known. A better choice is |
|
84 | FreeBSD 11 this timezone is not known. A better choice is | |
85 | TZ=Pacific/Johnston. On Linux "US/Hawaii" is just a symlink to this |
|
85 | TZ=Pacific/Johnston. On Linux "US/Hawaii" is just a symlink to this | |
86 | name and also it is known on FreeBSD and on Solaris. |
|
86 | name and also it is known on FreeBSD and on Solaris. | |
87 |
|
87 | |||
88 | $ TZ=Pacific/Johnston hg convert --config convert.localtimezone=True src src-hg |
|
88 | $ TZ=Pacific/Johnston hg convert --config convert.localtimezone=True src src-hg | |
89 | initializing destination src-hg repository |
|
89 | initializing destination src-hg repository | |
90 | connecting to $TESTTMP/cvsrepo |
|
90 | connecting to $TESTTMP/cvsrepo | |
91 | scanning source... |
|
91 | scanning source... | |
92 | collecting CVS rlog |
|
92 | collecting CVS rlog | |
93 | 5 log entries |
|
93 | 5 log entries | |
94 | cvslog hook: 5 entries |
|
94 | cvslog hook: 5 entries | |
95 | creating changesets |
|
95 | creating changesets | |
96 | 3 changeset entries |
|
96 | 3 changeset entries | |
97 | cvschangesets hook: 3 changesets |
|
97 | cvschangesets hook: 3 changesets | |
98 | sorting... |
|
98 | sorting... | |
99 | converting... |
|
99 | converting... | |
100 | 2 Initial revision |
|
100 | 2 Initial revision | |
101 | 1 ci0 |
|
101 | 1 ci0 | |
102 | 0 import |
|
102 | 0 import | |
103 | updating tags |
|
103 | updating tags | |
104 | $ hgcat a |
|
104 | $ hgcat a | |
105 | a |
|
105 | a | |
106 | $ hgcat b/c |
|
106 | $ hgcat b/c | |
107 | c |
|
107 | c | |
108 | c |
|
108 | c | |
109 |
|
109 | |||
110 | convert fresh repo with --filemap |
|
110 | convert fresh repo with --filemap | |
111 |
|
111 | |||
112 | $ echo include b/c > filemap |
|
112 | $ echo include b/c > filemap | |
113 | $ hg convert --filemap filemap src src-filemap |
|
113 | $ hg convert --filemap filemap src src-filemap | |
114 | initializing destination src-filemap repository |
|
114 | initializing destination src-filemap repository | |
115 | connecting to $TESTTMP/cvsrepo |
|
115 | connecting to $TESTTMP/cvsrepo | |
116 | scanning source... |
|
116 | scanning source... | |
117 | collecting CVS rlog |
|
117 | collecting CVS rlog | |
118 | 5 log entries |
|
118 | 5 log entries | |
119 | cvslog hook: 5 entries |
|
119 | cvslog hook: 5 entries | |
120 | creating changesets |
|
120 | creating changesets | |
121 | 3 changeset entries |
|
121 | 3 changeset entries | |
122 | cvschangesets hook: 3 changesets |
|
122 | cvschangesets hook: 3 changesets | |
123 | sorting... |
|
123 | sorting... | |
124 | converting... |
|
124 | converting... | |
125 | 2 Initial revision |
|
125 | 2 Initial revision | |
126 | 1 ci0 |
|
126 | 1 ci0 | |
127 | 0 import |
|
127 | 0 import | |
128 | filtering out empty revision |
|
128 | filtering out empty revision | |
129 | repository tip rolled back to revision 1 (undo convert) |
|
129 | repository tip rolled back to revision 1 (undo convert) | |
130 | updating tags |
|
130 | updating tags | |
131 | $ hgcat b/c |
|
131 | $ hgcat b/c | |
132 | c |
|
132 | c | |
133 | c |
|
133 | c | |
134 | $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n' |
|
134 | $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n' | |
135 | 2 update tags files: .hgtags |
|
135 | 2 update tags files: .hgtags | |
136 | 1 ci0 files: b/c |
|
136 | 1 ci0 files: b/c | |
137 | 0 Initial revision files: b/c |
|
137 | 0 Initial revision files: b/c | |
138 |
|
138 | |||
139 | convert full repository (issue1649) |
|
139 | convert full repository (issue1649) | |
140 |
|
140 | |||
141 | $ cvscall -q -d "$CVSROOT" checkout -d srcfull "." | grep -v CVSROOT |
|
141 | $ cvscall -q -d "$CVSROOT" checkout -d srcfull "." | grep -v CVSROOT | |
142 | U srcfull/src/a |
|
142 | U srcfull/src/a | |
143 | U srcfull/src/b/c |
|
143 | U srcfull/src/b/c | |
144 | $ ls srcfull |
|
144 | $ ls srcfull | |
145 | CVS |
|
145 | CVS | |
146 | CVSROOT |
|
146 | CVSROOT | |
147 | src |
|
147 | src | |
148 | $ hg convert srcfull srcfull-hg \ |
|
148 | $ hg convert srcfull srcfull-hg \ | |
149 | > | grep -v 'log entries' | grep -v 'hook:' \ |
|
149 | > | grep -v 'log entries' | grep -v 'hook:' \ | |
150 | > | grep -v '^[0-3] .*' # filter instable changeset order |
|
150 | > | grep -v '^[0-3] .*' # filter instable changeset order | |
151 | initializing destination srcfull-hg repository |
|
151 | initializing destination srcfull-hg repository | |
152 | connecting to $TESTTMP/cvsrepo |
|
152 | connecting to $TESTTMP/cvsrepo | |
153 | scanning source... |
|
153 | scanning source... | |
154 | collecting CVS rlog |
|
154 | collecting CVS rlog | |
155 | creating changesets |
|
155 | creating changesets | |
156 | 4 changeset entries |
|
156 | 4 changeset entries | |
157 | sorting... |
|
157 | sorting... | |
158 | converting... |
|
158 | converting... | |
159 | updating tags |
|
159 | updating tags | |
160 | $ hg cat -r tip --cwd srcfull-hg src/a |
|
160 | $ hg cat -r tip --cwd srcfull-hg src/a | |
161 | a |
|
161 | a | |
162 | $ hg cat -r tip --cwd srcfull-hg src/b/c |
|
162 | $ hg cat -r tip --cwd srcfull-hg src/b/c | |
163 | c |
|
163 | c | |
164 | c |
|
164 | c | |
165 |
|
165 | |||
166 | commit new file revisions |
|
166 | commit new file revisions | |
167 |
|
167 | |||
168 | $ cd src |
|
168 | $ cd src | |
169 | $ echo a >> a |
|
169 | $ echo a >> a | |
170 | $ echo c >> b/c |
|
170 | $ echo c >> b/c | |
171 | $ cvscall -q commit -mci1 . | grep '<--' |
|
171 | $ cvscall -q commit -mci1 . | grep '<--' | |
172 | $TESTTMP/cvsrepo/src/a,v <-- a |
|
172 | $TESTTMP/cvsrepo/src/a,v <-- a | |
173 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) |
|
173 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) | |
174 | $ cd .. |
|
174 | $ cd .. | |
175 |
|
175 | |||
176 | convert again |
|
176 | convert again | |
177 |
|
177 | |||
178 | $ TZ=Pacific/Johnston hg convert --config convert.localtimezone=True src src-hg |
|
178 | $ TZ=Pacific/Johnston hg convert --config convert.localtimezone=True src src-hg | |
179 | connecting to $TESTTMP/cvsrepo |
|
179 | connecting to $TESTTMP/cvsrepo | |
180 | scanning source... |
|
180 | scanning source... | |
181 | collecting CVS rlog |
|
181 | collecting CVS rlog | |
182 | 7 log entries |
|
182 | 7 log entries | |
183 | cvslog hook: 7 entries |
|
183 | cvslog hook: 7 entries | |
184 | creating changesets |
|
184 | creating changesets | |
185 | 4 changeset entries |
|
185 | 4 changeset entries | |
186 | cvschangesets hook: 4 changesets |
|
186 | cvschangesets hook: 4 changesets | |
187 | sorting... |
|
187 | sorting... | |
188 | converting... |
|
188 | converting... | |
189 | 0 ci1 |
|
189 | 0 ci1 | |
190 | $ hgcat a |
|
190 | $ hgcat a | |
191 | a |
|
191 | a | |
192 | a |
|
192 | a | |
193 | $ hgcat b/c |
|
193 | $ hgcat b/c | |
194 | c |
|
194 | c | |
195 | c |
|
195 | c | |
196 | c |
|
196 | c | |
197 |
|
197 | |||
198 | convert again with --filemap |
|
198 | convert again with --filemap | |
199 |
|
199 | |||
200 | $ hg convert --filemap filemap src src-filemap |
|
200 | $ hg convert --filemap filemap src src-filemap | |
201 | connecting to $TESTTMP/cvsrepo |
|
201 | connecting to $TESTTMP/cvsrepo | |
202 | scanning source... |
|
202 | scanning source... | |
203 | collecting CVS rlog |
|
203 | collecting CVS rlog | |
204 | 7 log entries |
|
204 | 7 log entries | |
205 | cvslog hook: 7 entries |
|
205 | cvslog hook: 7 entries | |
206 | creating changesets |
|
206 | creating changesets | |
207 | 4 changeset entries |
|
207 | 4 changeset entries | |
208 | cvschangesets hook: 4 changesets |
|
208 | cvschangesets hook: 4 changesets | |
209 | sorting... |
|
209 | sorting... | |
210 | converting... |
|
210 | converting... | |
211 | 0 ci1 |
|
211 | 0 ci1 | |
212 | $ hgcat b/c |
|
212 | $ hgcat b/c | |
213 | c |
|
213 | c | |
214 | c |
|
214 | c | |
215 | c |
|
215 | c | |
216 | $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n' |
|
216 | $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n' | |
217 | 3 ci1 files: b/c |
|
217 | 3 ci1 files: b/c | |
218 | 2 update tags files: .hgtags |
|
218 | 2 update tags files: .hgtags | |
219 | 1 ci0 files: b/c |
|
219 | 1 ci0 files: b/c | |
220 | 0 Initial revision files: b/c |
|
220 | 0 Initial revision files: b/c | |
221 |
|
221 | |||
222 | commit branch |
|
222 | commit branch | |
223 |
|
223 | |||
224 | $ cd src |
|
224 | $ cd src | |
225 | $ cvs -q update -r1.1 b/c |
|
225 | $ cvs -q update -r1.1 b/c | |
226 | U b/c |
|
226 | U b/c | |
227 | $ cvs -q tag -b branch |
|
227 | $ cvs -q tag -b branch | |
228 | T a |
|
228 | T a | |
229 | T b/c |
|
229 | T b/c | |
230 | $ cvs -q update -r branch > /dev/null |
|
230 | $ cvs -q update -r branch > /dev/null | |
231 | $ sleep 1 |
|
231 | $ sleep 1 | |
232 | $ echo d >> b/c |
|
232 | $ echo d >> b/c | |
233 | $ cvs -q commit -mci2 . | grep '<--' |
|
233 | $ cvs -q commit -mci2 . | grep '<--' | |
234 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) |
|
234 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) | |
235 | $ cd .. |
|
235 | $ cd .. | |
236 |
|
236 | |||
237 | convert again |
|
237 | convert again | |
238 |
|
238 | |||
239 | $ TZ=Pacific/Johnston hg convert --config convert.localtimezone=True src src-hg |
|
239 | $ TZ=Pacific/Johnston hg convert --config convert.localtimezone=True src src-hg | |
240 | connecting to $TESTTMP/cvsrepo |
|
240 | connecting to $TESTTMP/cvsrepo | |
241 | scanning source... |
|
241 | scanning source... | |
242 | collecting CVS rlog |
|
242 | collecting CVS rlog | |
243 | 8 log entries |
|
243 | 8 log entries | |
244 | cvslog hook: 8 entries |
|
244 | cvslog hook: 8 entries | |
245 | creating changesets |
|
245 | creating changesets | |
246 | 5 changeset entries |
|
246 | 5 changeset entries | |
247 | cvschangesets hook: 5 changesets |
|
247 | cvschangesets hook: 5 changesets | |
248 | sorting... |
|
248 | sorting... | |
249 | converting... |
|
249 | converting... | |
250 | 0 ci2 |
|
250 | 0 ci2 | |
251 | $ hgcat b/c |
|
251 | $ hgcat b/c | |
252 | c |
|
252 | c | |
253 | d |
|
253 | d | |
254 |
|
254 | |||
255 | convert again with --filemap |
|
255 | convert again with --filemap | |
256 |
|
256 | |||
257 | $ TZ=Pacific/Johnston hg convert --config convert.localtimezone=True --filemap filemap src src-filemap |
|
257 | $ TZ=Pacific/Johnston hg convert --config convert.localtimezone=True --filemap filemap src src-filemap | |
258 | connecting to $TESTTMP/cvsrepo |
|
258 | connecting to $TESTTMP/cvsrepo | |
259 | scanning source... |
|
259 | scanning source... | |
260 | collecting CVS rlog |
|
260 | collecting CVS rlog | |
261 | 8 log entries |
|
261 | 8 log entries | |
262 | cvslog hook: 8 entries |
|
262 | cvslog hook: 8 entries | |
263 | creating changesets |
|
263 | creating changesets | |
264 | 5 changeset entries |
|
264 | 5 changeset entries | |
265 | cvschangesets hook: 5 changesets |
|
265 | cvschangesets hook: 5 changesets | |
266 | sorting... |
|
266 | sorting... | |
267 | converting... |
|
267 | converting... | |
268 | 0 ci2 |
|
268 | 0 ci2 | |
269 | $ hgcat b/c |
|
269 | $ hgcat b/c | |
270 | c |
|
270 | c | |
271 | d |
|
271 | d | |
272 | $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n' |
|
272 | $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n' | |
273 | 4 ci2 files: b/c |
|
273 | 4 ci2 files: b/c | |
274 | 3 ci1 files: b/c |
|
274 | 3 ci1 files: b/c | |
275 | 2 update tags files: .hgtags |
|
275 | 2 update tags files: .hgtags | |
276 | 1 ci0 files: b/c |
|
276 | 1 ci0 files: b/c | |
277 | 0 Initial revision files: b/c |
|
277 | 0 Initial revision files: b/c | |
278 |
|
278 | |||
279 | commit a new revision with funny log message |
|
279 | commit a new revision with funny log message | |
280 |
|
280 | |||
281 | $ cd src |
|
281 | $ cd src | |
282 | $ sleep 1 |
|
282 | $ sleep 1 | |
283 | $ echo e >> a |
|
283 | $ echo e >> a | |
284 | $ cvscall -q commit -m'funny |
|
284 | $ cvscall -q commit -m'funny | |
285 | > ---------------------------- |
|
285 | > ---------------------------- | |
286 | > log message' . | grep '<--' |\ |
|
286 | > log message' . | grep '<--' |\ | |
287 | > sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
|
287 | > sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' | |
288 | checking in src/a,v |
|
288 | checking in src/a,v | |
289 |
|
289 | |||
290 | commit new file revisions with some fuzz |
|
290 | commit new file revisions with some fuzz | |
291 |
|
291 | |||
292 | $ sleep 1 |
|
292 | $ sleep 1 | |
293 | $ echo f >> a |
|
293 | $ echo f >> a | |
294 | $ cvscall -q commit -mfuzzy . | grep '<--' |
|
294 | $ cvscall -q commit -mfuzzy . | grep '<--' | |
295 | $TESTTMP/cvsrepo/src/a,v <-- a |
|
295 | $TESTTMP/cvsrepo/src/a,v <-- a | |
296 | $ sleep 4 # the two changes will be split if fuzz < 4 |
|
296 | $ sleep 4 # the two changes will be split if fuzz < 4 | |
297 | $ echo g >> b/c |
|
297 | $ echo g >> b/c | |
298 | $ cvscall -q commit -mfuzzy . | grep '<--' |
|
298 | $ cvscall -q commit -mfuzzy . | grep '<--' | |
299 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) |
|
299 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) | |
300 | $ cd .. |
|
300 | $ cd .. | |
301 |
|
301 | |||
302 | convert again |
|
302 | convert again | |
303 |
|
303 | |||
304 | $ TZ=Pacific/Johnston hg convert --config convert.cvsps.fuzz=2 --config convert.localtimezone=True src src-hg |
|
304 | $ TZ=Pacific/Johnston hg convert --config convert.cvsps.fuzz=2 --config convert.localtimezone=True src src-hg | |
305 | connecting to $TESTTMP/cvsrepo |
|
305 | connecting to $TESTTMP/cvsrepo | |
306 | scanning source... |
|
306 | scanning source... | |
307 | collecting CVS rlog |
|
307 | collecting CVS rlog | |
308 | 11 log entries |
|
308 | 11 log entries | |
309 | cvslog hook: 11 entries |
|
309 | cvslog hook: 11 entries | |
310 | creating changesets |
|
310 | creating changesets | |
311 | 8 changeset entries |
|
311 | 8 changeset entries | |
312 | cvschangesets hook: 8 changesets |
|
312 | cvschangesets hook: 8 changesets | |
313 | sorting... |
|
313 | sorting... | |
314 | converting... |
|
314 | converting... | |
315 | 2 funny |
|
315 | 2 funny | |
316 | 1 fuzzy |
|
316 | 1 fuzzy | |
317 | 0 fuzzy |
|
317 | 0 fuzzy | |
318 | $ hg -R src-hg log -G --template '{rev} ({branches}) {desc} date: {date|date} files: {files}\n' |
|
318 | $ hg -R src-hg log -G --template '{rev} ({branches}) {desc} date: {date|date} files: {files}\n' | |
319 | o 8 (branch) fuzzy date: * -1000 files: b/c (glob) |
|
319 | o 8 (branch) fuzzy date: * -1000 files: b/c (glob) | |
320 | | |
|
320 | | | |
321 | o 7 (branch) fuzzy date: * -1000 files: a (glob) |
|
321 | o 7 (branch) fuzzy date: * -1000 files: a (glob) | |
322 | | |
|
322 | | | |
323 | o 6 (branch) funny |
|
323 | o 6 (branch) funny | |
324 | | ---------------------------- |
|
324 | | ---------------------------- | |
325 | | log message date: * -1000 files: a (glob) |
|
325 | | log message date: * -1000 files: a (glob) | |
326 | o 5 (branch) ci2 date: * -1000 files: b/c (glob) |
|
326 | o 5 (branch) ci2 date: * -1000 files: b/c (glob) | |
327 |
|
327 | |||
328 | o 4 () ci1 date: * -1000 files: a b/c (glob) |
|
328 | o 4 () ci1 date: * -1000 files: a b/c (glob) | |
329 | | |
|
329 | | | |
330 | o 3 () update tags date: * +0000 files: .hgtags (glob) |
|
330 | o 3 () update tags date: * +0000 files: .hgtags (glob) | |
331 | | |
|
331 | | | |
332 | | o 2 (INITIAL) import date: * -1000 files: (glob) |
|
332 | | o 2 (INITIAL) import date: * -1000 files: (glob) | |
333 | | | |
|
333 | | | | |
334 | o | 1 () ci0 date: * -1000 files: b/c (glob) |
|
334 | o | 1 () ci0 date: * -1000 files: b/c (glob) | |
335 | |/ |
|
335 | |/ | |
336 | o 0 () Initial revision date: * -1000 files: a b/c (glob) |
|
336 | o 0 () Initial revision date: * -1000 files: a b/c (glob) | |
337 |
|
337 | |||
338 |
|
338 | |||
339 | testing debugcvsps |
|
339 | testing debugcvsps | |
340 |
|
340 | |||
341 | $ cd src |
|
341 | $ cd src | |
342 | $ hg debugcvsps --fuzz=2 -x >/dev/null |
|
342 | $ hg debugcvsps --fuzz=2 -x >/dev/null | |
343 |
|
343 | |||
344 | commit a new revision changing a and removing b/c |
|
344 | commit a new revision changing a and removing b/c | |
345 |
|
345 | |||
346 | $ cvscall -q update -A |
|
346 | $ cvscall -q update -A | |
347 | U a |
|
347 | U a | |
348 | U b/c |
|
348 | U b/c | |
349 | $ sleep 1 |
|
349 | $ sleep 1 | |
350 | $ echo h >> a |
|
350 | $ echo h >> a | |
351 | $ cvscall -Q remove -f b/c |
|
351 | $ cvscall -Q remove -f b/c | |
352 | $ cvscall -q commit -mci | grep '<--' |
|
352 | $ cvscall -q commit -mci | grep '<--' | |
353 | $TESTTMP/cvsrepo/src/a,v <-- a |
|
353 | $TESTTMP/cvsrepo/src/a,v <-- a | |
354 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) |
|
354 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) | |
355 |
|
355 | |||
356 | update and verify the cvsps cache |
|
356 | update and verify the cvsps cache | |
357 |
|
357 | |||
358 | $ hg debugcvsps --fuzz=2 -u |
|
358 | $ hg debugcvsps --fuzz=2 -u | |
359 | collecting CVS rlog |
|
359 | collecting CVS rlog | |
360 | 13 log entries |
|
360 | 13 log entries | |
361 | cvslog hook: 13 entries |
|
361 | cvslog hook: 13 entries | |
362 | creating changesets |
|
362 | creating changesets | |
363 | 11 changeset entries |
|
363 | 11 changeset entries | |
364 | cvschangesets hook: 11 changesets |
|
364 | cvschangesets hook: 11 changesets | |
365 | --------------------- |
|
365 | --------------------- | |
366 | PatchSet 1 |
|
366 | PatchSet 1 | |
367 | Date: * (glob) |
|
367 | Date: * (glob) | |
368 | Author: * (glob) |
|
368 | Author: * (glob) | |
369 | Branch: HEAD |
|
369 | Branch: HEAD | |
370 | Tag: (none) |
|
370 | Tag: (none) | |
371 | Branchpoints: INITIAL |
|
371 | Branchpoints: INITIAL | |
372 | Log: |
|
372 | Log: | |
373 | Initial revision |
|
373 | Initial revision | |
374 |
|
374 | |||
375 | Members: |
|
375 | Members: | |
376 | a:INITIAL->1.1 |
|
376 | a:INITIAL->1.1 | |
377 |
|
377 | |||
378 | --------------------- |
|
378 | --------------------- | |
379 | PatchSet 2 |
|
379 | PatchSet 2 | |
380 | Date: * (glob) |
|
380 | Date: * (glob) | |
381 | Author: * (glob) |
|
381 | Author: * (glob) | |
382 | Branch: HEAD |
|
382 | Branch: HEAD | |
383 | Tag: (none) |
|
383 | Tag: (none) | |
384 | Branchpoints: INITIAL, branch |
|
384 | Branchpoints: INITIAL, branch | |
385 | Log: |
|
385 | Log: | |
386 | Initial revision |
|
386 | Initial revision | |
387 |
|
387 | |||
388 | Members: |
|
388 | Members: | |
389 | b/c:INITIAL->1.1 |
|
389 | b/c:INITIAL->1.1 | |
390 |
|
390 | |||
391 | --------------------- |
|
391 | --------------------- | |
392 | PatchSet 3 |
|
392 | PatchSet 3 | |
393 | Date: * (glob) |
|
393 | Date: * (glob) | |
394 | Author: * (glob) |
|
394 | Author: * (glob) | |
395 | Branch: INITIAL |
|
395 | Branch: INITIAL | |
396 | Tag: start |
|
396 | Tag: start | |
397 | Log: |
|
397 | Log: | |
398 | import |
|
398 | import | |
399 |
|
399 | |||
400 | Members: |
|
400 | Members: | |
401 | a:1.1->1.1.1.1 |
|
401 | a:1.1->1.1.1.1 | |
402 | b/c:1.1->1.1.1.1 |
|
402 | b/c:1.1->1.1.1.1 | |
403 |
|
403 | |||
404 | --------------------- |
|
404 | --------------------- | |
405 | PatchSet 4 |
|
405 | PatchSet 4 | |
406 | Date: * (glob) |
|
406 | Date: * (glob) | |
407 | Author: * (glob) |
|
407 | Author: * (glob) | |
408 | Branch: HEAD |
|
408 | Branch: HEAD | |
409 | Tag: (none) |
|
409 | Tag: (none) | |
410 | Log: |
|
410 | Log: | |
411 | ci0 |
|
411 | ci0 | |
412 |
|
412 | |||
413 | Members: |
|
413 | Members: | |
414 | b/c:1.1->1.2 |
|
414 | b/c:1.1->1.2 | |
415 |
|
415 | |||
416 | --------------------- |
|
416 | --------------------- | |
417 | PatchSet 5 |
|
417 | PatchSet 5 | |
418 | Date: * (glob) |
|
418 | Date: * (glob) | |
419 | Author: * (glob) |
|
419 | Author: * (glob) | |
420 | Branch: HEAD |
|
420 | Branch: HEAD | |
421 | Tag: (none) |
|
421 | Tag: (none) | |
422 | Branchpoints: branch |
|
422 | Branchpoints: branch | |
423 | Log: |
|
423 | Log: | |
424 | ci1 |
|
424 | ci1 | |
425 |
|
425 | |||
426 | Members: |
|
426 | Members: | |
427 | a:1.1->1.2 |
|
427 | a:1.1->1.2 | |
428 |
|
428 | |||
429 | --------------------- |
|
429 | --------------------- | |
430 | PatchSet 6 |
|
430 | PatchSet 6 | |
431 | Date: * (glob) |
|
431 | Date: * (glob) | |
432 | Author: * (glob) |
|
432 | Author: * (glob) | |
433 | Branch: HEAD |
|
433 | Branch: HEAD | |
434 | Tag: (none) |
|
434 | Tag: (none) | |
435 | Log: |
|
435 | Log: | |
436 | ci1 |
|
436 | ci1 | |
437 |
|
437 | |||
438 | Members: |
|
438 | Members: | |
439 | b/c:1.2->1.3 |
|
439 | b/c:1.2->1.3 | |
440 |
|
440 | |||
441 | --------------------- |
|
441 | --------------------- | |
442 | PatchSet 7 |
|
442 | PatchSet 7 | |
443 | Date: * (glob) |
|
443 | Date: * (glob) | |
444 | Author: * (glob) |
|
444 | Author: * (glob) | |
445 | Branch: branch |
|
445 | Branch: branch | |
446 | Tag: (none) |
|
446 | Tag: (none) | |
447 | Log: |
|
447 | Log: | |
448 | ci2 |
|
448 | ci2 | |
449 |
|
449 | |||
450 | Members: |
|
450 | Members: | |
451 | b/c:1.1->1.1.2.1 |
|
451 | b/c:1.1->1.1.2.1 | |
452 |
|
452 | |||
453 | --------------------- |
|
453 | --------------------- | |
454 | PatchSet 8 |
|
454 | PatchSet 8 | |
455 | Date: * (glob) |
|
455 | Date: * (glob) | |
456 | Author: * (glob) |
|
456 | Author: * (glob) | |
457 | Branch: branch |
|
457 | Branch: branch | |
458 | Tag: (none) |
|
458 | Tag: (none) | |
459 | Log: |
|
459 | Log: | |
460 | funny |
|
460 | funny | |
461 | ---------------------------- |
|
461 | ---------------------------- | |
462 | log message |
|
462 | log message | |
463 |
|
463 | |||
464 | Members: |
|
464 | Members: | |
465 | a:1.2->1.2.2.1 |
|
465 | a:1.2->1.2.2.1 | |
466 |
|
466 | |||
467 | --------------------- |
|
467 | --------------------- | |
468 | PatchSet 9 |
|
468 | PatchSet 9 | |
469 | Date: * (glob) |
|
469 | Date: * (glob) | |
470 | Author: * (glob) |
|
470 | Author: * (glob) | |
471 | Branch: branch |
|
471 | Branch: branch | |
472 | Tag: (none) |
|
472 | Tag: (none) | |
473 | Log: |
|
473 | Log: | |
474 | fuzzy |
|
474 | fuzzy | |
475 |
|
475 | |||
476 | Members: |
|
476 | Members: | |
477 | a:1.2.2.1->1.2.2.2 |
|
477 | a:1.2.2.1->1.2.2.2 | |
478 |
|
478 | |||
479 | --------------------- |
|
479 | --------------------- | |
480 | PatchSet 10 |
|
480 | PatchSet 10 | |
481 | Date: * (glob) |
|
481 | Date: * (glob) | |
482 | Author: * (glob) |
|
482 | Author: * (glob) | |
483 | Branch: branch |
|
483 | Branch: branch | |
484 | Tag: (none) |
|
484 | Tag: (none) | |
485 | Log: |
|
485 | Log: | |
486 | fuzzy |
|
486 | fuzzy | |
487 |
|
487 | |||
488 | Members: |
|
488 | Members: | |
489 | b/c:1.1.2.1->1.1.2.2 |
|
489 | b/c:1.1.2.1->1.1.2.2 | |
490 |
|
490 | |||
491 | --------------------- |
|
491 | --------------------- | |
492 | PatchSet 11 |
|
492 | PatchSet 11 | |
493 | Date: * (glob) |
|
493 | Date: * (glob) | |
494 | Author: * (glob) |
|
494 | Author: * (glob) | |
495 | Branch: HEAD |
|
495 | Branch: HEAD | |
496 | Tag: (none) |
|
496 | Tag: (none) | |
497 | Log: |
|
497 | Log: | |
498 | ci |
|
498 | ci | |
499 |
|
499 | |||
500 | Members: |
|
500 | Members: | |
501 | a:1.2->1.3 |
|
501 | a:1.2->1.3 | |
502 | b/c:1.3->1.4(DEAD) |
|
502 | b/c:1.3->1.4(DEAD) | |
503 |
|
503 | |||
504 |
|
504 | |||
505 | $ cd .. |
|
505 | $ cd .. | |
506 |
|
506 | |||
507 | Test transcoding CVS log messages (issue5597) |
|
507 | Test transcoding CVS log messages (issue5597) | |
508 | ============================================= |
|
508 | ============================================= | |
509 |
|
509 | |||
510 | To emulate commit messages in (non-ascii) multiple encodings portably, |
|
510 | To emulate commit messages in (non-ascii) multiple encodings portably, | |
511 | this test scenario writes CVS history file (*,v file) directly via |
|
511 | this test scenario writes CVS history file (*,v file) directly via | |
512 | python code. |
|
512 | python code. | |
513 |
|
513 | |||
514 | Commit messages of version 1.2 - 1.4 use u3042 in 3 encodings below. |
|
514 | Commit messages of version 1.2 - 1.4 use u3042 in 3 encodings below. | |
515 |
|
515 | |||
516 | |encoding |byte sequence | decodable as: | |
|
516 | |encoding |byte sequence | decodable as: | | |
517 | | | | utf-8 euc-jp cp932 | |
|
517 | | | | utf-8 euc-jp cp932 | | |
518 | +----------+--------------+--------------------+ |
|
518 | +----------+--------------+--------------------+ | |
519 | |utf-8 |\xe3\x81\x82 | o x x | |
|
519 | |utf-8 |\xe3\x81\x82 | o x x | | |
520 | |euc-jp |\xa4\xa2 | x o o | |
|
520 | |euc-jp |\xa4\xa2 | x o o | | |
521 | |cp932 |\x82\xa0 | x x o | |
|
521 | |cp932 |\x82\xa0 | x x o | | |
522 |
|
522 | |||
523 | $ mkdir -p cvsrepo/transcoding |
|
523 | $ mkdir -p cvsrepo/transcoding | |
524 | $ python <<EOF |
|
524 | $ python <<EOF | |
525 | > fp = open('cvsrepo/transcoding/file,v', 'wb') |
|
525 | > fp = open('cvsrepo/transcoding/file,v', 'wb') | |
526 | > fp.write((b''' |
|
526 | > fp.write((b''' | |
527 | > head 1.4; |
|
527 | > head 1.4; | |
528 | > access; |
|
528 | > access; | |
529 | > symbols |
|
529 | > symbols | |
530 | > start:1.1.1.1 INITIAL:1.1.1; |
|
530 | > start:1.1.1.1 INITIAL:1.1.1; | |
531 | > locks; strict; |
|
531 | > locks; strict; | |
532 | > comment @# @; |
|
532 | > comment @# @; | |
533 | > |
|
533 | > | |
534 | > |
|
534 | > | |
535 | > 1.4 |
|
535 | > 1.4 | |
536 | > date 2017.07.10.00.00.04; author nobody; state Exp; |
|
536 | > date 2017.07.10.00.00.04; author nobody; state Exp; | |
537 | > branches; |
|
537 | > branches; | |
538 | > next 1.3; |
|
538 | > next 1.3; | |
539 | > commitid 10059635D016A510FFA; |
|
539 | > commitid 10059635D016A510FFA; | |
540 | > |
|
540 | > | |
541 | > 1.3 |
|
541 | > 1.3 | |
542 | > date 2017.07.10.00.00.03; author nobody; state Exp; |
|
542 | > date 2017.07.10.00.00.03; author nobody; state Exp; | |
543 | > branches; |
|
543 | > branches; | |
544 | > next 1.2; |
|
544 | > next 1.2; | |
545 | > commitid 10059635CFF6A4FF34E; |
|
545 | > commitid 10059635CFF6A4FF34E; | |
546 | > |
|
546 | > | |
547 | > 1.2 |
|
547 | > 1.2 | |
548 | > date 2017.07.10.00.00.02; author nobody; state Exp; |
|
548 | > date 2017.07.10.00.00.02; author nobody; state Exp; | |
549 | > branches; |
|
549 | > branches; | |
550 | > next 1.1; |
|
550 | > next 1.1; | |
551 | > commitid 10059635CFD6A4D5095; |
|
551 | > commitid 10059635CFD6A4D5095; | |
552 | > |
|
552 | > | |
553 | > 1.1 |
|
553 | > 1.1 | |
554 | > date 2017.07.10.00.00.01; author nobody; state Exp; |
|
554 | > date 2017.07.10.00.00.01; author nobody; state Exp; | |
555 | > branches |
|
555 | > branches | |
556 | > 1.1.1.1; |
|
556 | > 1.1.1.1; | |
557 | > next ; |
|
557 | > next ; | |
558 | > commitid 10059635CFB6A4A3C33; |
|
558 | > commitid 10059635CFB6A4A3C33; | |
559 | > |
|
559 | > | |
560 | > 1.1.1.1 |
|
560 | > 1.1.1.1 | |
561 | > date 2017.07.10.00.00.01; author nobody; state Exp; |
|
561 | > date 2017.07.10.00.00.01; author nobody; state Exp; | |
562 | > branches; |
|
562 | > branches; | |
563 | > next ; |
|
563 | > next ; | |
564 | > commitid 10059635CFB6A4A3C33; |
|
564 | > commitid 10059635CFB6A4A3C33; | |
565 | > |
|
565 | > | |
566 | > |
|
566 | > | |
567 | > desc |
|
567 | > desc | |
568 | > @@ |
|
568 | > @@ | |
569 | > |
|
569 | > | |
570 | > |
|
570 | > | |
571 | > 1.4 |
|
571 | > 1.4 | |
572 | > log |
|
572 | > log | |
573 | > @''' + u'\u3042'.encode('cp932') + b''' (cp932) |
|
573 | > @''' + u'\u3042'.encode('cp932') + b''' (cp932) | |
574 | > @ |
|
574 | > @ | |
575 | > text |
|
575 | > text | |
576 | > @1 |
|
576 | > @1 | |
577 | > 2 |
|
577 | > 2 | |
578 | > 3 |
|
578 | > 3 | |
579 | > 4 |
|
579 | > 4 | |
580 | > @ |
|
580 | > @ | |
581 | > |
|
581 | > | |
582 | > |
|
582 | > | |
583 | > 1.3 |
|
583 | > 1.3 | |
584 | > log |
|
584 | > log | |
585 | > @''' + u'\u3042'.encode('euc-jp') + b''' (euc-jp) |
|
585 | > @''' + u'\u3042'.encode('euc-jp') + b''' (euc-jp) | |
586 | > @ |
|
586 | > @ | |
587 | > text |
|
587 | > text | |
588 | > @d4 1 |
|
588 | > @d4 1 | |
589 | > @ |
|
589 | > @ | |
590 | > |
|
590 | > | |
591 | > |
|
591 | > | |
592 | > 1.2 |
|
592 | > 1.2 | |
593 | > log |
|
593 | > log | |
594 | > @''' + u'\u3042'.encode('utf-8') + b''' (utf-8) |
|
594 | > @''' + u'\u3042'.encode('utf-8') + b''' (utf-8) | |
595 | > @ |
|
595 | > @ | |
596 | > text |
|
596 | > text | |
597 | > @d3 1 |
|
597 | > @d3 1 | |
598 | > @ |
|
598 | > @ | |
599 | > |
|
599 | > | |
600 | > |
|
600 | > | |
601 | > 1.1 |
|
601 | > 1.1 | |
602 | > log |
|
602 | > log | |
603 | > @Initial revision |
|
603 | > @Initial revision | |
604 | > @ |
|
604 | > @ | |
605 | > text |
|
605 | > text | |
606 | > @d2 1 |
|
606 | > @d2 1 | |
607 | > @ |
|
607 | > @ | |
608 | > |
|
608 | > | |
609 | > |
|
609 | > | |
610 | > 1.1.1.1 |
|
610 | > 1.1.1.1 | |
611 | > log |
|
611 | > log | |
612 | > @import |
|
612 | > @import | |
613 | > @ |
|
613 | > @ | |
614 | > text |
|
614 | > text | |
615 | > @@ |
|
615 | > @@ | |
616 | > ''').lstrip()) |
|
616 | > ''').lstrip()) | |
617 | > EOF |
|
617 | > EOF | |
618 |
|
618 | |||
619 | $ cvscall -q checkout transcoding |
|
619 | $ cvscall -q checkout transcoding | |
620 | U transcoding/file |
|
620 | U transcoding/file | |
621 |
|
621 | |||
622 | Test converting in normal case |
|
622 | Test converting in normal case | |
623 | ------------------------------ |
|
623 | ------------------------------ | |
624 |
|
624 | |||
625 | (filtering by grep in order to check only form of debug messages) |
|
625 | (filtering by grep in order to check only form of debug messages) | |
626 |
|
626 | |||
627 | $ hg convert --config convert.cvsps.logencoding=utf-8,euc-jp,cp932 -q --debug transcoding transcoding-hg | grep 'transcoding by' |
|
627 | $ hg convert --config convert.cvsps.logencoding=utf-8,euc-jp,cp932 -q --debug transcoding transcoding-hg | grep 'transcoding by' | |
628 | transcoding by utf-8: 1.1 of file |
|
628 | transcoding by utf-8: 1.1 of file | |
629 | transcoding by utf-8: 1.1.1.1 of file |
|
629 | transcoding by utf-8: 1.1.1.1 of file | |
630 | transcoding by utf-8: 1.2 of file |
|
630 | transcoding by utf-8: 1.2 of file | |
631 | transcoding by euc-jp: 1.3 of file |
|
631 | transcoding by euc-jp: 1.3 of file | |
632 | transcoding by cp932: 1.4 of file |
|
632 | transcoding by cp932: 1.4 of file | |
633 | $ hg -R transcoding-hg --encoding utf-8 log -T "{rev}: {desc}\n" |
|
633 | $ hg -R transcoding-hg --encoding utf-8 log -T "{rev}: {desc}\n" | |
634 | 5: update tags |
|
634 | 5: update tags | |
635 | 4: import |
|
635 | 4: import | |
636 | 3: \xe3\x81\x82 (cp932) (esc) |
|
636 | 3: \xe3\x81\x82 (cp932) (esc) | |
637 | 2: \xe3\x81\x82 (euc-jp) (esc) |
|
637 | 2: \xe3\x81\x82 (euc-jp) (esc) | |
638 | 1: \xe3\x81\x82 (utf-8) (esc) |
|
638 | 1: \xe3\x81\x82 (utf-8) (esc) | |
639 | 0: Initial revision |
|
639 | 0: Initial revision | |
640 | $ rm -rf transcoding-hg |
|
640 | $ rm -rf transcoding-hg | |
641 |
|
641 | |||
642 | Test converting in error cases |
|
642 | Test converting in error cases | |
643 | ------------------------------ |
|
643 | ------------------------------ | |
644 |
|
644 | |||
645 | unknown encoding in convert.cvsps.logencoding |
|
645 | unknown encoding in convert.cvsps.logencoding | |
646 |
|
646 | |||
647 | $ hg convert --config convert.cvsps.logencoding=foobar -q transcoding transcoding-hg |
|
647 | $ hg convert --config convert.cvsps.logencoding=foobar -q transcoding transcoding-hg | |
648 | abort: unknown encoding: foobar |
|
648 | abort: unknown encoding: foobar | |
649 | (check convert.cvsps.logencoding configuration) |
|
649 | (check convert.cvsps.logencoding configuration) | |
650 | [255] |
|
650 | [255] | |
651 | $ rm -rf transcoding-hg |
|
651 | $ rm -rf transcoding-hg | |
652 |
|
652 | |||
653 | no acceptable encoding in convert.cvsps.logencoding |
|
653 | no acceptable encoding in convert.cvsps.logencoding | |
654 |
|
654 | |||
655 | $ hg convert --config convert.cvsps.logencoding=utf-8,euc-jp -q transcoding transcoding-hg |
|
655 | $ hg convert --config convert.cvsps.logencoding=utf-8,euc-jp -q transcoding transcoding-hg | |
656 | abort: no encoding can transcode CVS log message for 1.4 of file |
|
656 | abort: no encoding can transcode CVS log message for 1.4 of file | |
657 | (check convert.cvsps.logencoding configuration) |
|
657 | (check convert.cvsps.logencoding configuration) | |
658 | [255] |
|
658 | [255] | |
659 | $ rm -rf transcoding-hg |
|
659 | $ rm -rf transcoding-hg |
@@ -1,207 +1,207 b'' | |||||
1 | #require cvs |
|
1 | #require cvs no-root | |
2 |
|
2 | |||
3 | $ filterpath() |
|
3 | $ filterpath() | |
4 | > { |
|
4 | > { | |
5 | > eval "$@" | sed "s:$CVSROOT:*REPO*:g" |
|
5 | > eval "$@" | sed "s:$CVSROOT:*REPO*:g" | |
6 | > } |
|
6 | > } | |
7 | $ cvscall() |
|
7 | $ cvscall() | |
8 | > { |
|
8 | > { | |
9 | > cvs -f "$@" |
|
9 | > cvs -f "$@" | |
10 | > } |
|
10 | > } | |
11 |
|
11 | |||
12 | output of 'cvs ci' varies unpredictably, so discard most of it |
|
12 | output of 'cvs ci' varies unpredictably, so discard most of it | |
13 | -- just keep the part that matters |
|
13 | -- just keep the part that matters | |
14 |
|
14 | |||
15 | $ cvsci() |
|
15 | $ cvsci() | |
16 | > { |
|
16 | > { | |
17 | > cvs -f ci -f "$@" > /dev/null |
|
17 | > cvs -f ci -f "$@" > /dev/null | |
18 | > } |
|
18 | > } | |
19 | $ hgcat() |
|
19 | $ hgcat() | |
20 | > { |
|
20 | > { | |
21 | > hg --cwd src-hg cat -r tip "$1" |
|
21 | > hg --cwd src-hg cat -r tip "$1" | |
22 | > } |
|
22 | > } | |
23 | $ echo "[extensions]" >> $HGRCPATH |
|
23 | $ echo "[extensions]" >> $HGRCPATH | |
24 | $ echo "convert = " >> $HGRCPATH |
|
24 | $ echo "convert = " >> $HGRCPATH | |
25 |
|
25 | |||
26 | create cvs repository |
|
26 | create cvs repository | |
27 |
|
27 | |||
28 | $ mkdir cvsmaster |
|
28 | $ mkdir cvsmaster | |
29 | $ cd cvsmaster |
|
29 | $ cd cvsmaster | |
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 | $ rmdir cvsmaster |
|
35 | $ rmdir cvsmaster | |
36 | $ filterpath cvscall -Q -d "$CVSROOT" init |
|
36 | $ filterpath cvscall -Q -d "$CVSROOT" init | |
37 |
|
37 | |||
38 | checkout #1: add foo.txt |
|
38 | checkout #1: add foo.txt | |
39 |
|
39 | |||
40 | $ cvscall -Q checkout -d cvsworktmp . |
|
40 | $ cvscall -Q checkout -d cvsworktmp . | |
41 | $ cd cvsworktmp |
|
41 | $ cd cvsworktmp | |
42 | $ mkdir foo |
|
42 | $ mkdir foo | |
43 | $ cvscall -Q add foo |
|
43 | $ cvscall -Q add foo | |
44 | $ cd foo |
|
44 | $ cd foo | |
45 | $ echo foo > foo.txt |
|
45 | $ echo foo > foo.txt | |
46 | $ cvscall -Q add foo.txt |
|
46 | $ cvscall -Q add foo.txt | |
47 | $ cvsci -m "add foo.txt" foo.txt |
|
47 | $ cvsci -m "add foo.txt" foo.txt | |
48 | $ cd ../.. |
|
48 | $ cd ../.. | |
49 | $ rm -rf cvsworktmp |
|
49 | $ rm -rf cvsworktmp | |
50 |
|
50 | |||
51 | checkout #2: create MYBRANCH1 and modify foo.txt on it |
|
51 | checkout #2: create MYBRANCH1 and modify foo.txt on it | |
52 |
|
52 | |||
53 | $ cvscall -Q checkout -d cvswork foo |
|
53 | $ cvscall -Q checkout -d cvswork foo | |
54 | $ cd cvswork |
|
54 | $ cd cvswork | |
55 | $ cvscall -q rtag -b -R MYBRANCH1 foo |
|
55 | $ cvscall -q rtag -b -R MYBRANCH1 foo | |
56 | $ cvscall -Q update -P -r MYBRANCH1 |
|
56 | $ cvscall -Q update -P -r MYBRANCH1 | |
57 | $ echo bar > foo.txt |
|
57 | $ echo bar > foo.txt | |
58 | $ cvsci -m "bar" foo.txt |
|
58 | $ cvsci -m "bar" foo.txt | |
59 | $ echo baz > foo.txt |
|
59 | $ echo baz > foo.txt | |
60 | $ cvsci -m "baz" foo.txt |
|
60 | $ cvsci -m "baz" foo.txt | |
61 |
|
61 | |||
62 | create MYBRANCH1_2 and modify foo.txt some more |
|
62 | create MYBRANCH1_2 and modify foo.txt some more | |
63 |
|
63 | |||
64 | $ cvscall -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo |
|
64 | $ cvscall -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo | |
65 | $ cvscall -Q update -P -r MYBRANCH1_2 |
|
65 | $ cvscall -Q update -P -r MYBRANCH1_2 | |
66 | $ echo bazzie > foo.txt |
|
66 | $ echo bazzie > foo.txt | |
67 | $ cvsci -m "bazzie" foo.txt |
|
67 | $ cvsci -m "bazzie" foo.txt | |
68 |
|
68 | |||
69 | create MYBRANCH1_1 and modify foo.txt yet again |
|
69 | create MYBRANCH1_1 and modify foo.txt yet again | |
70 |
|
70 | |||
71 | $ cvscall -q rtag -b -R MYBRANCH1_1 foo |
|
71 | $ cvscall -q rtag -b -R MYBRANCH1_1 foo | |
72 | $ cvscall -Q update -P -r MYBRANCH1_1 |
|
72 | $ cvscall -Q update -P -r MYBRANCH1_1 | |
73 | $ echo quux > foo.txt |
|
73 | $ echo quux > foo.txt | |
74 | $ cvsci -m "quux" foo.txt |
|
74 | $ cvsci -m "quux" foo.txt | |
75 |
|
75 | |||
76 | merge MYBRANCH1 to MYBRANCH1_1 |
|
76 | merge MYBRANCH1 to MYBRANCH1_1 | |
77 |
|
77 | |||
78 | $ filterpath cvscall -Q update -P -jMYBRANCH1 |
|
78 | $ filterpath cvscall -Q update -P -jMYBRANCH1 | |
79 | rcsmerge: warning: conflicts during merge |
|
79 | rcsmerge: warning: conflicts during merge | |
80 | RCS file: *REPO*/foo/foo.txt,v |
|
80 | RCS file: *REPO*/foo/foo.txt,v | |
81 | retrieving revision 1.1 |
|
81 | retrieving revision 1.1 | |
82 | retrieving revision 1.1.2.2 |
|
82 | retrieving revision 1.1.2.2 | |
83 | Merging differences between 1.1 and 1.1.2.2 into foo.txt |
|
83 | Merging differences between 1.1 and 1.1.2.2 into foo.txt | |
84 |
|
84 | |||
85 | carefully placed sleep to dodge cvs bug (optimization?) where it |
|
85 | carefully placed sleep to dodge cvs bug (optimization?) where it | |
86 | sometimes ignores a "commit" command if it comes too fast (the -f |
|
86 | sometimes ignores a "commit" command if it comes too fast (the -f | |
87 | option in cvsci seems to work for all the other commits in this |
|
87 | option in cvsci seems to work for all the other commits in this | |
88 | script) |
|
88 | script) | |
89 |
|
89 | |||
90 | $ sleep 1 |
|
90 | $ sleep 1 | |
91 | $ echo xyzzy > foo.txt |
|
91 | $ echo xyzzy > foo.txt | |
92 | $ cvsci -m "merge1+clobber" foo.txt |
|
92 | $ cvsci -m "merge1+clobber" foo.txt | |
93 |
|
93 | |||
94 | #if unix-permissions |
|
94 | #if unix-permissions | |
95 |
|
95 | |||
96 | return to trunk and merge MYBRANCH1_2 |
|
96 | return to trunk and merge MYBRANCH1_2 | |
97 |
|
97 | |||
98 | $ cvscall -Q update -P -A |
|
98 | $ cvscall -Q update -P -A | |
99 | $ filterpath cvscall -Q update -P -jMYBRANCH1_2 |
|
99 | $ filterpath cvscall -Q update -P -jMYBRANCH1_2 | |
100 | RCS file: *REPO*/foo/foo.txt,v |
|
100 | RCS file: *REPO*/foo/foo.txt,v | |
101 | retrieving revision 1.1 |
|
101 | retrieving revision 1.1 | |
102 | retrieving revision 1.1.2.2.2.1 |
|
102 | retrieving revision 1.1.2.2.2.1 | |
103 | Merging differences between 1.1 and 1.1.2.2.2.1 into foo.txt |
|
103 | Merging differences between 1.1 and 1.1.2.2.2.1 into foo.txt | |
104 | $ cvsci -m "merge2" foo.txt |
|
104 | $ cvsci -m "merge2" foo.txt | |
105 | $ REALCVS=`which cvs` |
|
105 | $ REALCVS=`which cvs` | |
106 | $ echo "for x in \$*; do if [ \"\$x\" = \"rlog\" ]; then echo \"RCS file: $CVSROOT/foo/foo.txt,v\"; cat \"$TESTDIR/test-convert-cvsnt-mergepoints.rlog\"; exit 0; fi; done; $REALCVS \$*" > ../cvs |
|
106 | $ echo "for x in \$*; do if [ \"\$x\" = \"rlog\" ]; then echo \"RCS file: $CVSROOT/foo/foo.txt,v\"; cat \"$TESTDIR/test-convert-cvsnt-mergepoints.rlog\"; exit 0; fi; done; $REALCVS \$*" > ../cvs | |
107 | $ chmod +x ../cvs |
|
107 | $ chmod +x ../cvs | |
108 | $ PATH=..:${PATH} hg debugcvsps --parents foo |
|
108 | $ PATH=..:${PATH} hg debugcvsps --parents foo | |
109 | collecting CVS rlog |
|
109 | collecting CVS rlog | |
110 | 7 log entries |
|
110 | 7 log entries | |
111 | creating changesets |
|
111 | creating changesets | |
112 | 7 changeset entries |
|
112 | 7 changeset entries | |
113 | --------------------- |
|
113 | --------------------- | |
114 | PatchSet 1 |
|
114 | PatchSet 1 | |
115 | Date: * (glob) |
|
115 | Date: * (glob) | |
116 | Author: user |
|
116 | Author: user | |
117 | Branch: HEAD |
|
117 | Branch: HEAD | |
118 | Tag: (none) |
|
118 | Tag: (none) | |
119 | Branchpoints: MYBRANCH1, MYBRANCH1_1 |
|
119 | Branchpoints: MYBRANCH1, MYBRANCH1_1 | |
120 | Log: |
|
120 | Log: | |
121 | foo.txt |
|
121 | foo.txt | |
122 |
|
122 | |||
123 | Members: |
|
123 | Members: | |
124 | foo.txt:INITIAL->1.1 |
|
124 | foo.txt:INITIAL->1.1 | |
125 |
|
125 | |||
126 | --------------------- |
|
126 | --------------------- | |
127 | PatchSet 2 |
|
127 | PatchSet 2 | |
128 | Date: * (glob) |
|
128 | Date: * (glob) | |
129 | Author: user |
|
129 | Author: user | |
130 | Branch: MYBRANCH1 |
|
130 | Branch: MYBRANCH1 | |
131 | Tag: (none) |
|
131 | Tag: (none) | |
132 | Parent: 1 |
|
132 | Parent: 1 | |
133 | Log: |
|
133 | Log: | |
134 | bar |
|
134 | bar | |
135 |
|
135 | |||
136 | Members: |
|
136 | Members: | |
137 | foo.txt:1.1->1.1.2.1 |
|
137 | foo.txt:1.1->1.1.2.1 | |
138 |
|
138 | |||
139 | --------------------- |
|
139 | --------------------- | |
140 | PatchSet 3 |
|
140 | PatchSet 3 | |
141 | Date: * (glob) |
|
141 | Date: * (glob) | |
142 | Author: user |
|
142 | Author: user | |
143 | Branch: MYBRANCH1 |
|
143 | Branch: MYBRANCH1 | |
144 | Tag: (none) |
|
144 | Tag: (none) | |
145 | Branchpoints: MYBRANCH1_2 |
|
145 | Branchpoints: MYBRANCH1_2 | |
146 | Parent: 2 |
|
146 | Parent: 2 | |
147 | Log: |
|
147 | Log: | |
148 | baz |
|
148 | baz | |
149 |
|
149 | |||
150 | Members: |
|
150 | Members: | |
151 | foo.txt:1.1.2.1->1.1.2.2 |
|
151 | foo.txt:1.1.2.1->1.1.2.2 | |
152 |
|
152 | |||
153 | --------------------- |
|
153 | --------------------- | |
154 | PatchSet 4 |
|
154 | PatchSet 4 | |
155 | Date: * (glob) |
|
155 | Date: * (glob) | |
156 | Author: user |
|
156 | Author: user | |
157 | Branch: MYBRANCH1_1 |
|
157 | Branch: MYBRANCH1_1 | |
158 | Tag: (none) |
|
158 | Tag: (none) | |
159 | Parent: 1 |
|
159 | Parent: 1 | |
160 | Log: |
|
160 | Log: | |
161 | quux |
|
161 | quux | |
162 |
|
162 | |||
163 | Members: |
|
163 | Members: | |
164 | foo.txt:1.1->1.1.4.1 |
|
164 | foo.txt:1.1->1.1.4.1 | |
165 |
|
165 | |||
166 | --------------------- |
|
166 | --------------------- | |
167 | PatchSet 5 |
|
167 | PatchSet 5 | |
168 | Date: * (glob) |
|
168 | Date: * (glob) | |
169 | Author: user |
|
169 | Author: user | |
170 | Branch: MYBRANCH1_2 |
|
170 | Branch: MYBRANCH1_2 | |
171 | Tag: (none) |
|
171 | Tag: (none) | |
172 | Parent: 3 |
|
172 | Parent: 3 | |
173 | Log: |
|
173 | Log: | |
174 | bazzie |
|
174 | bazzie | |
175 |
|
175 | |||
176 | Members: |
|
176 | Members: | |
177 | foo.txt:1.1.2.2->1.1.2.2.2.1 |
|
177 | foo.txt:1.1.2.2->1.1.2.2.2.1 | |
178 |
|
178 | |||
179 | --------------------- |
|
179 | --------------------- | |
180 | PatchSet 6 |
|
180 | PatchSet 6 | |
181 | Date: * (glob) |
|
181 | Date: * (glob) | |
182 | Author: user |
|
182 | Author: user | |
183 | Branch: HEAD |
|
183 | Branch: HEAD | |
184 | Tag: (none) |
|
184 | Tag: (none) | |
185 | Parents: 1,5 |
|
185 | Parents: 1,5 | |
186 | Log: |
|
186 | Log: | |
187 | merge |
|
187 | merge | |
188 |
|
188 | |||
189 | Members: |
|
189 | Members: | |
190 | foo.txt:1.1->1.2 |
|
190 | foo.txt:1.1->1.2 | |
191 |
|
191 | |||
192 | --------------------- |
|
192 | --------------------- | |
193 | PatchSet 7 |
|
193 | PatchSet 7 | |
194 | Date: * (glob) |
|
194 | Date: * (glob) | |
195 | Author: user |
|
195 | Author: user | |
196 | Branch: MYBRANCH1_1 |
|
196 | Branch: MYBRANCH1_1 | |
197 | Tag: (none) |
|
197 | Tag: (none) | |
198 | Parents: 4,3 |
|
198 | Parents: 4,3 | |
199 | Log: |
|
199 | Log: | |
200 | merge |
|
200 | merge | |
201 |
|
201 | |||
202 | Members: |
|
202 | Members: | |
203 | foo.txt:1.1.4.1->1.1.4.2 |
|
203 | foo.txt:1.1.4.1->1.1.4.2 | |
204 |
|
204 | |||
205 | #endif |
|
205 | #endif | |
206 |
|
206 | |||
207 | $ cd .. |
|
207 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now