Show More
@@ -1,99 +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() |
|
5 | filterpath() | |
6 | { |
|
6 | { | |
7 | eval "$@" | sed "s:$CVSROOT:*REPO*:g" |
|
7 | eval "$@" | sed "s:$CVSROOT:*REPO*:g" | |
8 | } |
|
8 | } | |
9 |
|
9 | |||
10 | cvscall() |
|
10 | cvscall() | |
11 | { |
|
11 | { | |
12 | echo cvs -f "$@" |
|
12 | echo cvs -f "$@" | |
13 | cvs -f "$@" |
|
13 | cvs -f "$@" | |
14 | } |
|
14 | } | |
15 |
|
15 | |||
16 | # output of 'cvs ci' varies unpredictably, so discard most of it |
|
16 | # output of 'cvs ci' varies unpredictably, so discard most of it | |
17 | # -- just keep the part that matters |
|
17 | # -- just keep the part that matters | |
18 | cvsci() |
|
18 | cvsci() | |
19 | { |
|
19 | { | |
20 | echo cvs -f ci "$@" |
|
20 | echo cvs -f ci "$@" | |
21 | cvs -f ci "$@" 2>&1 | egrep "^(new|initial) revision:" |
|
21 | cvs -f ci "$@" 2>&1 | egrep "^(new|initial) revision:" | |
22 | } |
|
22 | } | |
23 |
|
23 | |||
24 | hgcat() |
|
24 | hgcat() | |
25 | { |
|
25 | { | |
26 | hg --cwd src-hg cat -r tip "$1" |
|
26 | hg --cwd src-hg cat -r tip "$1" | |
27 | } |
|
27 | } | |
28 |
|
28 | |||
29 | echo "[extensions]" >> $HGRCPATH |
|
29 | echo "[extensions]" >> $HGRCPATH | |
30 | echo "convert = " >> $HGRCPATH |
|
30 | echo "convert = " >> $HGRCPATH | |
31 | echo "graphlog = " >> $HGRCPATH |
|
31 | echo "graphlog = " >> $HGRCPATH | |
32 | echo "[convert]" >> $HGRCPATH |
|
32 | echo "[convert]" >> $HGRCPATH | |
33 | echo "cvsps=builtin" >> $HGRCPATH |
|
33 | echo "cvsps=builtin" >> $HGRCPATH | |
34 |
|
34 | |||
35 | echo "% create cvs repository" |
|
35 | echo "% create cvs repository" | |
36 | mkdir cvsmaster |
|
36 | mkdir cvsmaster | |
37 | cd cvsmaster |
|
37 | cd cvsmaster | |
38 | CVSROOT=`pwd` |
|
38 | CVSROOT=`pwd` | |
39 | export CVSROOT |
|
39 | export CVSROOT | |
40 | CVS_OPTIONS=-f |
|
40 | CVS_OPTIONS=-f | |
41 | export CVS_OPTIONS |
|
41 | export CVS_OPTIONS | |
42 | cd .. |
|
42 | cd .. | |
43 | filterpath cvscall -Q -d "$CVSROOT" init |
|
43 | filterpath cvscall -Q -d "$CVSROOT" init | |
44 |
|
44 | |||
45 | echo "% checkout #1: add foo.txt" |
|
45 | echo "% checkout #1: add foo.txt" | |
46 | cvscall -Q checkout -d cvsworktmp . |
|
46 | cvscall -Q checkout -d cvsworktmp . | |
47 | cd cvsworktmp |
|
47 | cd cvsworktmp | |
48 | mkdir foo |
|
48 | mkdir foo | |
49 | cvscall -Q add foo |
|
49 | cvscall -Q add foo | |
50 | cd foo |
|
50 | cd foo | |
51 | echo foo > foo.txt |
|
51 | echo foo > foo.txt | |
52 | cvscall -Q add foo.txt |
|
52 | cvscall -Q add foo.txt | |
53 | cvsci -m "foo.txt" |
|
53 | cvsci -m "foo.txt" | |
54 |
|
54 | |||
55 | cd ../.. |
|
55 | cd ../.. | |
56 | rm -rf cvsworktmp |
|
56 | rm -rf cvsworktmp | |
57 |
|
57 | |||
58 | echo "% checkout #2: create MYBRANCH1 and modify foo.txt on it" |
|
58 | echo "% checkout #2: create MYBRANCH1 and modify foo.txt on it" | |
59 | cvscall -Q checkout -d cvswork foo |
|
59 | cvscall -Q checkout -d cvswork foo | |
60 |
|
60 | |||
61 | cd cvswork |
|
61 | cd cvswork | |
62 |
|
62 | |||
63 | cvscall -q rtag -b -R MYBRANCH1 foo |
|
63 | cvscall -q rtag -b -R MYBRANCH1 foo | |
64 | cvscall -Q update -P -r MYBRANCH1 |
|
64 | cvscall -Q update -P -r MYBRANCH1 | |
65 | echo bar > foo.txt |
|
65 | echo bar > foo.txt | |
66 | cvsci -m "bar" |
|
66 | cvsci -m "bar" | |
67 | echo baz > foo.txt |
|
67 | echo baz > foo.txt | |
68 | cvsci -m "baz" |
|
68 | cvsci -m "baz" | |
69 |
|
69 | |||
70 | echo "% create MYBRANCH1_2 and modify foo.txt some more" |
|
70 | echo "% create MYBRANCH1_2 and modify foo.txt some more" | |
71 | cvscall -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo |
|
71 | cvscall -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo | |
72 | cvscall -Q update -P -r MYBRANCH1_2 |
|
72 | cvscall -Q update -P -r MYBRANCH1_2 | |
73 |
|
73 | |||
74 | echo bazzie > foo.txt |
|
74 | echo bazzie > foo.txt | |
75 | cvsci -m "bazzie" |
|
75 | cvsci -m "bazzie" | |
76 |
|
76 | |||
77 | echo "% create MYBRANCH1_1 and modify foo.txt yet again" |
|
77 | echo "% create MYBRANCH1_1 and modify foo.txt yet again" | |
78 | cvscall -q rtag -b -R MYBRANCH1_1 foo |
|
78 | cvscall -q rtag -b -R MYBRANCH1_1 foo | |
79 | cvscall -Q update -P -r MYBRANCH1_1 |
|
79 | cvscall -Q update -P -r MYBRANCH1_1 | |
80 |
|
80 | |||
81 | echo quux > foo.txt |
|
81 | echo quux > foo.txt | |
82 | cvsci -m "quux" |
|
82 | cvsci -m "quux" | |
83 |
|
83 | |||
84 | echo "% merge MYBRANCH1 to MYBRANCH1_1" |
|
84 | echo "% merge MYBRANCH1 to MYBRANCH1_1" | |
85 | filterpath cvscall -Q update -P -jMYBRANCH1 |
|
85 | filterpath cvscall -Q update -P -jMYBRANCH1 | |
86 | echo xyzzy > foo.txt |
|
86 | echo xyzzy > foo.txt | |
87 | cvsci -m "merge1" |
|
87 | cvsci -m "merge1" | |
88 |
|
88 | |||
89 | echo "% return to trunk and merge MYBRANCH1_2" |
|
89 | echo "% return to trunk and merge MYBRANCH1_2" | |
90 | cvscall -Q update -P -A |
|
90 | cvscall -Q update -P -A | |
91 | filterpath cvscall -Q update -P -jMYBRANCH1_2 |
|
91 | filterpath cvscall -Q update -P -jMYBRANCH1_2 | |
92 | cvsci -m "merge2" |
|
92 | cvsci -m "merge2" | |
93 |
|
93 | |||
94 | REALCVS=`which cvs` |
|
94 | REALCVS=`which 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 |
|
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 | |
96 | chmod +x cvs |
|
96 | chmod +x ../cvs | |
97 | 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:/' | |
98 |
|
98 | |||
99 | cd .. |
|
99 | cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now