comparison tests/test-convert-cvs-builtincvsps-cvsnt-mergepoints @ 7956:3e7611a83230

convert: added cvsnt mergepoint support
author Henrik Stuart <henrik.stuart@edlund.dk>
date Thu, 02 Apr 2009 14:48:06 +0200
parents
children 1f0f01bc86a5
comparison
equal deleted inserted replaced
7955:c3d4ff03ec72 7956:3e7611a83230
1 #!/bin/bash
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 export CVSROOT=`pwd`
25 export CVS_OPTIONS=-f
26 cd ..
27
28 cvscall -q -d "$CVSROOT" init
29
30 cvscall -q checkout -d cvsworktmp .
31 cd cvsworktmp
32 mkdir foo
33 cvscall -q add foo | sed -e 's/Directory .* added to the repository//g'
34 cd foo
35 echo foo > foo.txt
36 cvscall -q add foo.txt
37 cvscall -q ci -m "foo.txt" | sed 's/.*,v.*/checking in/g'
38
39 cd ../..
40 rm -rf cvsworktmp
41
42 cvscall -q checkout -d cvswork foo
43
44 cd cvswork
45
46 cvscall -q rtag -b -R MYBRANCH1 foo
47 cvscall -q up -P -r MYBRANCH1
48 echo bar > foo.txt
49 cvscall -q ci -m "bar" | sed 's/.*,v.*/checking in/g'
50 echo baz > foo.txt
51 cvscall -q ci -m "baz" | sed 's/.*,v.*/checking in/g'
52
53 cvscall -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo
54 cvscall -q up -P -r MYBRANCH1_2
55
56 echo bazzie > foo.txt
57 cvscall -q ci -m "bazzie" | sed 's/.*,v.*/checking in/g'
58
59 cvscall -q rtag -b -R MYBRANCH1_1 foo
60 cvscall -q up -P -r MYBRANCH1_1
61
62 echo quux > foo.txt
63 cvscall -q ci -m "quux" | sed 's/.*,v.*/checking in/g'
64 cvscall -q up -P -jMYBRANCH1 | sed 's/RCS file: .*,v/merging MYBRANCH1/g'
65 echo xyzzy > foo.txt
66 cvscall -q ci -m "merge" | sed 's/.*,v.*/checking in/g'
67
68 cvscall -q up -P -A
69
70 cvscall -q up -P -jMYBRANCH1_2 | sed 's/RCS file: .*,v/merging MYBRANCH1_2/g'
71 cvscall -q ci -m "merge" | sed 's/.*,v.*/checking in/g'
72
73 REALCVS=`which cvs`
74 echo "for x in \$*; do if [ \"\$x\" = \"rlog\" ]; then echo \"RCS file: $CVSROOT/foo/foo.txt,v\"; cat $TESTDIR/test-convert-cvs-builtincvsps-cvsnt-mergepoints.rlog; exit 0; fi; done; $REALCVS \$*" > cvs
75 chmod +x cvs
76 PATH=.:${PATH} hg debugcvsps --parents foo | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/'
77
78 cd ..