author | Matt Mackall <mpm@selenic.com> |
Mon, 04 May 2009 14:21:43 -0500 | |
changeset 8298 | 9542f4c3fa1b |
parent 7956 | 3e7611a83230 |
child 8350 | 1f0f01bc86a5 |
permissions | -rw-r--r-- |
7956
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
1 |
#!/bin/bash |
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 |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
24 |
export CVSROOT=`pwd` |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
25 |
export CVS_OPTIONS=-f |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
26 |
cd .. |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
27 |
|
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
28 |
cvscall -q -d "$CVSROOT" init |
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 checkout -d cvsworktmp . |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
31 |
cd cvsworktmp |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
32 |
mkdir foo |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
33 |
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
|
34 |
cd foo |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
35 |
echo foo > foo.txt |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
36 |
cvscall -q add foo.txt |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
37 |
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
|
38 |
|
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
39 |
cd ../.. |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
40 |
rm -rf cvsworktmp |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
41 |
|
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
42 |
cvscall -q checkout -d cvswork foo |
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 |
cd cvswork |
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 |
cvscall -q rtag -b -R MYBRANCH1 foo |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
47 |
cvscall -q up -P -r MYBRANCH1 |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
48 |
echo bar > foo.txt |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
49 |
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
|
50 |
echo baz > foo.txt |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
51 |
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
|
52 |
|
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
53 |
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
|
54 |
cvscall -q up -P -r MYBRANCH1_2 |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
55 |
|
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
56 |
echo bazzie > foo.txt |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
57 |
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
|
58 |
|
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
59 |
cvscall -q rtag -b -R MYBRANCH1_1 foo |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
60 |
cvscall -q up -P -r MYBRANCH1_1 |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
61 |
|
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
62 |
echo quux > foo.txt |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
63 |
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
|
64 |
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
|
65 |
echo xyzzy > foo.txt |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
66 |
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
|
67 |
|
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
68 |
cvscall -q up -P -A |
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 -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
|
71 |
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
|
72 |
|
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
73 |
REALCVS=`which cvs` |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
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 |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
75 |
chmod +x cvs |
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
76 |
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
|
77 |
|
3e7611a83230
convert: added cvsnt mergepoint support
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff
changeset
|
78 |
cd .. |