annotate tests/test-convert-cvsnt-mergepoints @ 8818:727f7aaefaab

Rename CVSNT "mergepoints" test and make it executable. - rename test-convert-cvs-builtincvsps-cvsnt-mergepoints (and related files) to test-convert-cvsnt-mergepoints - this ensures that the test will be run, but does NOT make it pass: in particularly, it fails regularly for me due to the inconsistent behaviour of CVS itself - expect "Branchpoints:" in debugcvsps output
author Greg Ward <greg-hg@gerg.ca>
date Mon, 15 Jun 2009 20:35:19 -0400
parents tests/test-convert-cvs-builtincvsps-cvsnt-mergepoints@ec8b8a0f494b
children e93ab347c814
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8451
ec8b8a0f494b cvsnt-mergepoints test: use sh instead of bash
Martin Geisler <mg@lazybytes.net>
parents: 8350
diff changeset
1 #!/bin/sh
7956
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
2
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
3 "$TESTDIR/hghave" cvs || exit 80
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
4
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
5 cvscall()
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
6 {
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
7 cvs -f "$@"
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
8 }
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
9
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
10 hgcat()
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
11 {
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
12 hg --cwd src-hg cat -r tip "$1"
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
13 }
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
14
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
15 echo "[extensions]" >> $HGRCPATH
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
16 echo "convert = " >> $HGRCPATH
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
17 echo "graphlog = " >> $HGRCPATH
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
18 echo "[convert]" >> $HGRCPATH
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
19 echo "cvsps=builtin" >> $HGRCPATH
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
20
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
21 echo % create cvs repository
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
22 mkdir cvsmaster
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
23 cd cvsmaster
8350
1f0f01bc86a5 tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents: 7956
diff changeset
24 CVSROOT=`pwd`
1f0f01bc86a5 tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents: 7956
diff changeset
25 export CVSROOT
1f0f01bc86a5 tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents: 7956
diff changeset
26 CVS_OPTIONS=-f
1f0f01bc86a5 tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents: 7956
diff changeset
27 export CVS_OPTIONS
7956
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
28 cd ..
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
29
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
30 cvscall -q -d "$CVSROOT" init
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
31
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
32 cvscall -q checkout -d cvsworktmp .
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
33 cd cvsworktmp
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
34 mkdir foo
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
35 cvscall -q add foo | sed -e 's/Directory .* added to the repository//g'
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
36 cd foo
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
37 echo foo > foo.txt
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
38 cvscall -q add foo.txt
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
39 cvscall -q ci -m "foo.txt" | sed 's/.*,v.*/checking in/g'
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
40
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
41 cd ../..
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
42 rm -rf cvsworktmp
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
43
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
44 cvscall -q checkout -d cvswork foo
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
45
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
46 cd cvswork
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
47
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
48 cvscall -q rtag -b -R MYBRANCH1 foo
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
49 cvscall -q up -P -r MYBRANCH1
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
50 echo bar > foo.txt
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
51 cvscall -q ci -m "bar" | sed 's/.*,v.*/checking in/g'
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
52 echo baz > foo.txt
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
53 cvscall -q ci -m "baz" | sed 's/.*,v.*/checking in/g'
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
54
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
55 cvscall -q rtag -b -R -r MYBRANCH1 MYBRANCH1_2 foo
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
56 cvscall -q up -P -r MYBRANCH1_2
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
57
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
58 echo bazzie > foo.txt
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
59 cvscall -q ci -m "bazzie" | sed 's/.*,v.*/checking in/g'
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
60
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
61 cvscall -q rtag -b -R MYBRANCH1_1 foo
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
62 cvscall -q up -P -r MYBRANCH1_1
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
63
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
64 echo quux > foo.txt
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
65 cvscall -q ci -m "quux" | sed 's/.*,v.*/checking in/g'
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
66 cvscall -q up -P -jMYBRANCH1 | sed 's/RCS file: .*,v/merging MYBRANCH1/g'
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
67 echo xyzzy > foo.txt
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
68 cvscall -q ci -m "merge" | sed 's/.*,v.*/checking in/g'
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
69
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
70 cvscall -q up -P -A
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
71
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
72 cvscall -q up -P -jMYBRANCH1_2 | sed 's/RCS file: .*,v/merging MYBRANCH1_2/g'
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
73 cvscall -q ci -m "merge" | sed 's/.*,v.*/checking in/g'
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
74
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
75 REALCVS=`which cvs`
8818
727f7aaefaab Rename CVSNT "mergepoints" test and make it executable.
Greg Ward <greg-hg@gerg.ca>
parents: 8451
diff changeset
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
7956
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
77 chmod +x cvs
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
78 PATH=.:${PATH} hg debugcvsps --parents foo | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/'
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
79
3e7611a83230 convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
80 cd ..