Show More
@@ -1,80 +1,99 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | "$TESTDIR/hghave" cvs || exit 80 |
|
3 | "$TESTDIR/hghave" cvs || exit 80 | |
4 |
|
4 | |||
|
5 | filterpath() | |||
|
6 | { | |||
|
7 | eval "$@" | sed "s:$CVSROOT:*REPO*:g" | |||
|
8 | } | |||
|
9 | ||||
5 | cvscall() |
|
10 | cvscall() | |
6 | { |
|
11 | { | |
|
12 | echo cvs -f "$@" | |||
7 | cvs -f "$@" |
|
13 | cvs -f "$@" | |
8 | } |
|
14 | } | |
9 |
|
15 | |||
|
16 | # output of 'cvs ci' varies unpredictably, so discard most of it | |||
|
17 | # -- just keep the part that matters | |||
|
18 | cvsci() | |||
|
19 | { | |||
|
20 | echo cvs -f ci "$@" | |||
|
21 | cvs -f ci "$@" 2>&1 | egrep "^(new|initial) revision:" | |||
|
22 | } | |||
|
23 | ||||
10 | hgcat() |
|
24 | hgcat() | |
11 | { |
|
25 | { | |
12 | hg --cwd src-hg cat -r tip "$1" |
|
26 | hg --cwd src-hg cat -r tip "$1" | |
13 | } |
|
27 | } | |
14 |
|
28 | |||
15 | echo "[extensions]" >> $HGRCPATH |
|
29 | echo "[extensions]" >> $HGRCPATH | |
16 | echo "convert = " >> $HGRCPATH |
|
30 | echo "convert = " >> $HGRCPATH | |
17 | echo "graphlog = " >> $HGRCPATH |
|
31 | echo "graphlog = " >> $HGRCPATH | |
18 | echo "[convert]" >> $HGRCPATH |
|
32 | echo "[convert]" >> $HGRCPATH | |
19 | echo "cvsps=builtin" >> $HGRCPATH |
|
33 | echo "cvsps=builtin" >> $HGRCPATH | |
20 |
|
34 | |||
21 | echo % create cvs repository |
|
35 | echo "% create cvs repository" | |
22 | mkdir cvsmaster |
|
36 | mkdir cvsmaster | |
23 | cd cvsmaster |
|
37 | cd cvsmaster | |
24 | CVSROOT=`pwd` |
|
38 | CVSROOT=`pwd` | |
25 | export CVSROOT |
|
39 | export CVSROOT | |
26 | CVS_OPTIONS=-f |
|
40 | CVS_OPTIONS=-f | |
27 | export CVS_OPTIONS |
|
41 | export CVS_OPTIONS | |
28 | cd .. |
|
42 | cd .. | |
|
43 | filterpath cvscall -Q -d "$CVSROOT" init | |||
29 |
|
44 | |||
30 | cvscall -q -d "$CVSROOT" init |
|
45 | echo "% checkout #1: add foo.txt" | |
31 |
|
46 | cvscall -Q checkout -d cvsworktmp . | ||
32 | cvscall -q checkout -d cvsworktmp . |
|
|||
33 | cd cvsworktmp |
|
47 | cd cvsworktmp | |
34 | mkdir foo |
|
48 | mkdir foo | |
35 | cvscall -q add foo | sed -e 's/Directory .* added to the repository//g' |
|
49 | cvscall -Q add foo | |
36 | cd foo |
|
50 | cd foo | |
37 | echo foo > foo.txt |
|
51 | echo foo > foo.txt | |
38 |
cvscall - |
|
52 | cvscall -Q add foo.txt | |
39 | cvscall -q ci -m "foo.txt" | sed 's/.*,v.*/checking in/g' |
|
53 | cvsci -m "foo.txt" | |
40 |
|
54 | |||
41 | cd ../.. |
|
55 | cd ../.. | |
42 | rm -rf cvsworktmp |
|
56 | rm -rf cvsworktmp | |
43 |
|
57 | |||
44 | cvscall -q checkout -d cvswork foo |
|
58 | echo "% checkout #2: create MYBRANCH1 and modify foo.txt on it" | |
|
59 | cvscall -Q checkout -d cvswork foo | |||
45 |
|
60 | |||
46 | cd cvswork |
|
61 | cd cvswork | |
47 |
|
62 | |||
48 | cvscall -q rtag -b -R MYBRANCH1 foo |
|
63 | cvscall -q rtag -b -R MYBRANCH1 foo | |
49 |
cvscall - |
|
64 | cvscall -Q update -P -r MYBRANCH1 | |
50 | echo bar > foo.txt |
|
65 | echo bar > foo.txt | |
51 | cvscall -q ci -m "bar" | sed 's/.*,v.*/checking in/g' |
|
66 | cvsci -m "bar" | |
52 | echo baz > foo.txt |
|
67 | echo baz > foo.txt | |
53 | cvscall -q ci -m "baz" | sed 's/.*,v.*/checking in/g' |
|
68 | cvsci -m "baz" | |
54 |
|
69 | |||
|
70 | echo "% create MYBRANCH1_2 and modify foo.txt some more" | |||
55 | cvscall -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo |
|
71 | cvscall -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo | |
56 |
cvscall - |
|
72 | cvscall -Q update -P -r MYBRANCH1_2 | |
57 |
|
73 | |||
58 | echo bazzie > foo.txt |
|
74 | echo bazzie > foo.txt | |
59 | cvscall -q ci -m "bazzie" | sed 's/.*,v.*/checking in/g' |
|
75 | cvsci -m "bazzie" | |
60 |
|
76 | |||
|
77 | echo "% create MYBRANCH1_1 and modify foo.txt yet again" | |||
61 | cvscall -q rtag -b -R MYBRANCH1_1 foo |
|
78 | cvscall -q rtag -b -R MYBRANCH1_1 foo | |
62 |
cvscall - |
|
79 | cvscall -Q update -P -r MYBRANCH1_1 | |
63 |
|
80 | |||
64 | echo quux > foo.txt |
|
81 | echo quux > foo.txt | |
65 | cvscall -q ci -m "quux" | sed 's/.*,v.*/checking in/g' |
|
82 | cvsci -m "quux" | |
66 | cvscall -q up -P -jMYBRANCH1 | sed 's/RCS file: .*,v/merging MYBRANCH1/g' |
|
|||
67 | echo xyzzy > foo.txt |
|
|||
68 | cvscall -q ci -m "merge" | sed 's/.*,v.*/checking in/g' |
|
|||
69 |
|
83 | |||
70 | cvscall -q up -P -A |
|
84 | echo "% merge MYBRANCH1 to MYBRANCH1_1" | |
|
85 | filterpath cvscall -Q update -P -jMYBRANCH1 | |||
|
86 | echo xyzzy > foo.txt | |||
|
87 | cvsci -m "merge1" | |||
71 |
|
88 | |||
72 | cvscall -q up -P -jMYBRANCH1_2 | sed 's/RCS file: .*,v/merging MYBRANCH1_2/g' |
|
89 | echo "% return to trunk and merge MYBRANCH1_2" | |
73 | cvscall -q ci -m "merge" | sed 's/.*,v.*/checking in/g' |
|
90 | cvscall -Q update -P -A | |
|
91 | filterpath cvscall -Q update -P -jMYBRANCH1_2 | |||
|
92 | cvsci -m "merge2" | |||
74 |
|
93 | |||
75 | REALCVS=`which cvs` |
|
94 | REALCVS=`which cvs` | |
76 | 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 |
|
95 | 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 | |
77 | chmod +x cvs |
|
96 | chmod +x cvs | |
78 | PATH=.:${PATH} hg debugcvsps --parents foo | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/' |
|
97 | PATH=.:${PATH} hg debugcvsps --parents foo | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/' | |
79 |
|
98 | |||
80 | cd .. |
|
99 | cd .. |
@@ -1,140 +1,140 b'' | |||||
1 | % create cvs repository |
|
1 | % create cvs repository | |
2 | U cvsworktmp/CVSROOT/checkoutlist |
|
2 | cvs -f -Q -d *REPO* init | |
3 | U cvsworktmp/CVSROOT/commitinfo |
|
3 | % checkout #1: add foo.txt | |
4 | U cvsworktmp/CVSROOT/config |
|
4 | cvs -f -Q checkout -d cvsworktmp . | |
5 | U cvsworktmp/CVSROOT/cvswrappers |
|
5 | cvs -f -Q add foo | |
6 | U cvsworktmp/CVSROOT/loginfo |
|
6 | cvs -f -Q add foo.txt | |
7 | U cvsworktmp/CVSROOT/modules |
|
7 | cvs -f ci -m foo.txt | |
8 | U cvsworktmp/CVSROOT/notify |
|
|||
9 | U cvsworktmp/CVSROOT/postadmin |
|
|||
10 | U cvsworktmp/CVSROOT/postproxy |
|
|||
11 | U cvsworktmp/CVSROOT/posttag |
|
|||
12 | U cvsworktmp/CVSROOT/postwatch |
|
|||
13 | U cvsworktmp/CVSROOT/preproxy |
|
|||
14 | U cvsworktmp/CVSROOT/rcsinfo |
|
|||
15 | U cvsworktmp/CVSROOT/taginfo |
|
|||
16 | U cvsworktmp/CVSROOT/verifymsg |
|
|||
17 |
|
||||
18 | cvs add: use `cvs commit' to add this file permanently |
|
|||
19 | checking in |
|
|||
20 | initial revision: 1.1 |
|
8 | initial revision: 1.1 | |
21 | U cvswork/foo.txt |
|
9 | % checkout #2: create MYBRANCH1 and modify foo.txt on it | |
22 | checking in |
|
10 | cvs -f -Q checkout -d cvswork foo | |
|
11 | cvs -f -q rtag -b -R MYBRANCH1 foo | |||
|
12 | cvs -f -Q update -P -r MYBRANCH1 | |||
|
13 | cvs -f ci -m bar | |||
23 | new revision: 1.1.2.1; previous revision: 1.1 |
|
14 | new revision: 1.1.2.1; previous revision: 1.1 | |
24 | checking in |
|
15 | cvs -f ci -m baz | |
25 | new revision: 1.1.2.2; previous revision: 1.1.2.1 |
|
16 | new revision: 1.1.2.2; previous revision: 1.1.2.1 | |
26 | checking in |
|
17 | % create MYBRANCH1_2 and modify foo.txt some more | |
|
18 | cvs -f -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo | |||
|
19 | cvs -f -Q update -P -r MYBRANCH1_2 | |||
|
20 | cvs -f ci -m bazzie | |||
27 | new revision: 1.1.2.2.2.1; previous revision: 1.1.2.2 |
|
21 | new revision: 1.1.2.2.2.1; previous revision: 1.1.2.2 | |
28 | U foo.txt |
|
22 | % create MYBRANCH1_1 and modify foo.txt yet again | |
29 | checking in |
|
23 | cvs -f -q rtag -b -R MYBRANCH1_1 foo | |
|
24 | cvs -f -Q update -P -r MYBRANCH1_1 | |||
|
25 | cvs -f ci -m quux | |||
30 | new revision: 1.1.4.1; previous revision: 1.1 |
|
26 | new revision: 1.1.4.1; previous revision: 1.1 | |
|
27 | % merge MYBRANCH1 to MYBRANCH1_1 | |||
31 | rcsmerge: warning: conflicts during merge |
|
28 | rcsmerge: warning: conflicts during merge | |
32 | merging MYBRANCH1 |
|
29 | cvs -f -Q update -P -jMYBRANCH1 | |
|
30 | RCS file: *REPO*/foo/foo.txt,v | |||
33 | retrieving revision 1.1 |
|
31 | retrieving revision 1.1 | |
34 | retrieving revision 1.1.2.2 |
|
32 | retrieving revision 1.1.2.2 | |
35 | Merging differences between 1.1 and 1.1.2.2 into foo.txt |
|
33 | Merging differences between 1.1 and 1.1.2.2 into foo.txt | |
36 | checking in |
|
34 | cvs -f ci -m merge1 | |
37 | new revision: 1.1.4.2; previous revision: 1.1.4.1 |
|
35 | new revision: 1.1.4.2; previous revision: 1.1.4.1 | |
38 | U foo.txt |
|
36 | % return to trunk and merge MYBRANCH1_2 | |
39 | merging MYBRANCH1_2 |
|
37 | cvs -f -Q update -P -A | |
|
38 | cvs -f -Q update -P -jMYBRANCH1_2 | |||
|
39 | RCS file: *REPO*/foo/foo.txt,v | |||
40 | retrieving revision 1.1 |
|
40 | retrieving revision 1.1 | |
41 | retrieving revision 1.1.2.2.2.1 |
|
41 | retrieving revision 1.1.2.2.2.1 | |
42 | Merging differences between 1.1 and 1.1.2.2.2.1 into foo.txt |
|
42 | Merging differences between 1.1 and 1.1.2.2.2.1 into foo.txt | |
43 | checking in |
|
43 | cvs -f ci -m merge2 | |
44 | new revision: 1.2; previous revision: 1.1 |
|
44 | new revision: 1.2; previous revision: 1.1 | |
45 | collecting CVS rlog |
|
45 | collecting CVS rlog | |
46 | 7 log entries |
|
46 | 7 log entries | |
47 | creating changesets |
|
47 | creating changesets | |
48 | 7 changeset entries |
|
48 | 7 changeset entries | |
49 | --------------------- |
|
49 | --------------------- | |
50 | PatchSet 1 |
|
50 | PatchSet 1 | |
51 | Date: |
|
51 | Date: | |
52 | Author: |
|
52 | Author: | |
53 | Branch: HEAD |
|
53 | Branch: HEAD | |
54 | Tag: (none) |
|
54 | Tag: (none) | |
55 | Branchpoints: MYBRANCH1_1, MYBRANCH1 |
|
55 | Branchpoints: MYBRANCH1_1, MYBRANCH1 | |
56 | Log: |
|
56 | Log: | |
57 | foo.txt |
|
57 | foo.txt | |
58 |
|
58 | |||
59 | Members: |
|
59 | Members: | |
60 | foo.txt:INITIAL->1.1 |
|
60 | foo.txt:INITIAL->1.1 | |
61 |
|
61 | |||
62 | --------------------- |
|
62 | --------------------- | |
63 | PatchSet 2 |
|
63 | PatchSet 2 | |
64 | Date: |
|
64 | Date: | |
65 | Author: |
|
65 | Author: | |
66 | Branch: MYBRANCH1 |
|
66 | Branch: MYBRANCH1 | |
67 | Tag: (none) |
|
67 | Tag: (none) | |
68 | Parent: 1 |
|
68 | Parent: 1 | |
69 | Log: |
|
69 | Log: | |
70 | bar |
|
70 | bar | |
71 |
|
71 | |||
72 | Members: |
|
72 | Members: | |
73 | foo.txt:1.1->1.1.2.1 |
|
73 | foo.txt:1.1->1.1.2.1 | |
74 |
|
74 | |||
75 | --------------------- |
|
75 | --------------------- | |
76 | PatchSet 3 |
|
76 | PatchSet 3 | |
77 | Date: |
|
77 | Date: | |
78 | Author: |
|
78 | Author: | |
79 | Branch: MYBRANCH1 |
|
79 | Branch: MYBRANCH1 | |
80 | Tag: (none) |
|
80 | Tag: (none) | |
81 | Branchpoints: MYBRANCH1_2 |
|
81 | Branchpoints: MYBRANCH1_2 | |
82 | Parent: 2 |
|
82 | Parent: 2 | |
83 | Log: |
|
83 | Log: | |
84 | baz |
|
84 | baz | |
85 |
|
85 | |||
86 | Members: |
|
86 | Members: | |
87 | foo.txt:1.1.2.1->1.1.2.2 |
|
87 | foo.txt:1.1.2.1->1.1.2.2 | |
88 |
|
88 | |||
89 | --------------------- |
|
89 | --------------------- | |
90 | PatchSet 4 |
|
90 | PatchSet 4 | |
91 | Date: |
|
91 | Date: | |
92 | Author: |
|
92 | Author: | |
93 | Branch: MYBRANCH1_1 |
|
93 | Branch: MYBRANCH1_1 | |
94 | Tag: (none) |
|
94 | Tag: (none) | |
95 | Parent: 1 |
|
95 | Parent: 1 | |
96 | Log: |
|
96 | Log: | |
97 | quux |
|
97 | quux | |
98 |
|
98 | |||
99 | Members: |
|
99 | Members: | |
100 | foo.txt:1.1->1.1.4.1 |
|
100 | foo.txt:1.1->1.1.4.1 | |
101 |
|
101 | |||
102 | --------------------- |
|
102 | --------------------- | |
103 | PatchSet 5 |
|
103 | PatchSet 5 | |
104 | Date: |
|
104 | Date: | |
105 | Author: |
|
105 | Author: | |
106 | Branch: MYBRANCH1_2 |
|
106 | Branch: MYBRANCH1_2 | |
107 | Tag: (none) |
|
107 | Tag: (none) | |
108 | Parent: 3 |
|
108 | Parent: 3 | |
109 | Log: |
|
109 | Log: | |
110 | bazzie |
|
110 | bazzie | |
111 |
|
111 | |||
112 | Members: |
|
112 | Members: | |
113 | foo.txt:1.1.2.2->1.1.2.2.2.1 |
|
113 | foo.txt:1.1.2.2->1.1.2.2.2.1 | |
114 |
|
114 | |||
115 | --------------------- |
|
115 | --------------------- | |
116 | PatchSet 6 |
|
116 | PatchSet 6 | |
117 | Date: |
|
117 | Date: | |
118 | Author: |
|
118 | Author: | |
119 | Branch: HEAD |
|
119 | Branch: HEAD | |
120 | Tag: (none) |
|
120 | Tag: (none) | |
121 | Parents: 1,5 |
|
121 | Parents: 1,5 | |
122 | Log: |
|
122 | Log: | |
123 | merge |
|
123 | merge | |
124 |
|
124 | |||
125 | Members: |
|
125 | Members: | |
126 | foo.txt:1.1->1.2 |
|
126 | foo.txt:1.1->1.2 | |
127 |
|
127 | |||
128 | --------------------- |
|
128 | --------------------- | |
129 | PatchSet 7 |
|
129 | PatchSet 7 | |
130 | Date: |
|
130 | Date: | |
131 | Author: |
|
131 | Author: | |
132 | Branch: MYBRANCH1_1 |
|
132 | Branch: MYBRANCH1_1 | |
133 | Tag: (none) |
|
133 | Tag: (none) | |
134 | Parents: 4,3 |
|
134 | Parents: 4,3 | |
135 | Log: |
|
135 | Log: | |
136 | merge |
|
136 | merge | |
137 |
|
137 | |||
138 | Members: |
|
138 | Members: | |
139 | foo.txt:1.1.4.1->1.1.4.2 |
|
139 | foo.txt:1.1.4.1->1.1.4.2 | |
140 |
|
140 |
General Comments 0
You need to be logged in to leave comments.
Login now