|
1 #!/bin/sh |
|
2 |
|
3 "$TESTDIR/hghave" cvs || exit 80 |
|
4 |
|
5 cvscall() |
|
6 { |
|
7 cvs -f "$@" |
|
8 } |
|
9 |
|
10 hgcat() |
|
11 { |
|
12 hg --cwd src-hg cat -r tip "$1" |
|
13 } |
|
14 |
|
15 echo "[extensions]" >> $HGRCPATH |
|
16 echo "convert = " >> $HGRCPATH |
|
17 echo "graphlog = " >> $HGRCPATH |
|
18 echo "[convert]" >> $HGRCPATH |
|
19 echo "cvsps=builtin" >> $HGRCPATH |
|
20 |
|
21 echo % create cvs repository |
|
22 mkdir cvsmaster |
|
23 cd cvsmaster |
|
24 CVSROOT=`pwd` |
|
25 export CVSROOT |
|
26 CVS_OPTIONS=-f |
|
27 export CVS_OPTIONS |
|
28 cd .. |
|
29 |
|
30 cvscall -q -d "$CVSROOT" init |
|
31 |
|
32 cvscall -q checkout -d cvsworktmp . |
|
33 cd cvsworktmp |
|
34 mkdir foo |
|
35 cvscall -q add foo | sed -e 's/Directory .* added to the repository//g' |
|
36 cd foo |
|
37 echo foo > foo.txt |
|
38 cvscall -q add foo.txt |
|
39 cvscall -q ci -m "foo.txt" | sed 's/.*,v.*/checking in/g' |
|
40 |
|
41 cd ../.. |
|
42 rm -rf cvsworktmp |
|
43 |
|
44 cvscall -q checkout -d cvswork foo |
|
45 |
|
46 cd cvswork |
|
47 |
|
48 cvscall -q rtag -b -R MYBRANCH1 foo |
|
49 cvscall -q up -P -r MYBRANCH1 |
|
50 echo bar > foo.txt |
|
51 cvscall -q ci -m "bar" | sed 's/.*,v.*/checking in/g' |
|
52 echo baz > foo.txt |
|
53 cvscall -q ci -m "baz" | sed 's/.*,v.*/checking in/g' |
|
54 |
|
55 cvscall -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo |
|
56 cvscall -q up -P -r MYBRANCH1_2 |
|
57 |
|
58 echo bazzie > foo.txt |
|
59 cvscall -q ci -m "bazzie" | sed 's/.*,v.*/checking in/g' |
|
60 |
|
61 cvscall -q rtag -b -R MYBRANCH1_1 foo |
|
62 cvscall -q up -P -r MYBRANCH1_1 |
|
63 |
|
64 echo quux > foo.txt |
|
65 cvscall -q ci -m "quux" | sed 's/.*,v.*/checking in/g' |
|
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 |
|
70 cvscall -q up -P -A |
|
71 |
|
72 cvscall -q up -P -jMYBRANCH1_2 | sed 's/RCS file: .*,v/merging MYBRANCH1_2/g' |
|
73 cvscall -q ci -m "merge" | sed 's/.*,v.*/checking in/g' |
|
74 |
|
75 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 |
|
77 chmod +x cvs |
|
78 PATH=.:${PATH} hg debugcvsps --parents foo | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/' |
|
79 |
|
80 cd .. |