author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
Wed, 20 May 2009 19:37:25 +0200 | |
changeset 8532 | b97e2417ae53 |
parent 8523 | 5b7da468531b |
child 8756 | 6019e6517f95 |
permissions | -rwxr-xr-x |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
1 |
#!/bin/sh |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
2 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
3 |
# This is http://www.selenic.com/mercurial/bts/issue1148 |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
4 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
5 |
"$TESTDIR/hghave" cvs || exit 80 |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
6 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
7 |
cvscall() |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
8 |
{ |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
9 |
cvs -f "$@" |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
10 |
} |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
11 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
12 |
echo "[extensions]" >> $HGRCPATH |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
13 |
echo "convert = " >> $HGRCPATH |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
14 |
echo "graphlog = " >> $HGRCPATH |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
15 |
echo "[convert]" >> $HGRCPATH |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
16 |
echo "cvsps=builtin" >> $HGRCPATH |
8169
6584953be356
convert/cvs: add an option to disable remote log caching
Patrick Mezard <pmezard@gmail.com>
parents:
7812
diff
changeset
|
17 |
echo "cvsps.cache=0" >> $HGRCPATH |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
18 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
19 |
echo % create cvs repository |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
20 |
mkdir cvsrepo |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
21 |
cd cvsrepo |
8350
1f0f01bc86a5
tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents:
8169
diff
changeset
|
22 |
CVSROOT=`pwd` |
1f0f01bc86a5
tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents:
8169
diff
changeset
|
23 |
export CVSROOT |
1f0f01bc86a5
tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents:
8169
diff
changeset
|
24 |
CVS_OPTIONS=-f |
1f0f01bc86a5
tests: avoid export FOO=bar bashism
Martin Geisler <mg@lazybytes.net>
parents:
8169
diff
changeset
|
25 |
export CVS_OPTIONS |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
26 |
cd .. |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
27 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
28 |
cvscall -q -d "$CVSROOT" init |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
29 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
30 |
echo % Create a new project |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
31 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
32 |
mkdir src |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
33 |
cd src |
7465
8f0305874701
tests: allow cvs import to reorder its filename list
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
6690
diff
changeset
|
34 |
echo "1" > a |
8f0305874701
tests: allow cvs import to reorder its filename list
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
6690
diff
changeset
|
35 |
echo "1" > b |
8f0305874701
tests: allow cvs import to reorder its filename list
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
6690
diff
changeset
|
36 |
cvscall import -m "init" src v0 r0 | sort |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
37 |
cd .. |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
38 |
cvscall co src |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
39 |
cd src |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
40 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
41 |
echo % Branch the project |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
42 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
43 |
cvscall tag -b BRANCH |
7812
18048153fd4e
test-convert-cvs*: mute output from "cvs up"
Mads Kiilerich <mads@kiilerich.com>
parents:
7465
diff
changeset
|
44 |
cvscall up -r BRANCH > /dev/null |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
45 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
46 |
echo % Modify file a, then b, then a |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
47 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
48 |
echo "2" > a |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
49 |
cvscall ci -m "mod a" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
50 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
51 |
echo "2" > b |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
52 |
cvscall ci -m "mod b" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
53 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
54 |
echo "3" > a |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
55 |
cvscall ci -m "mod a again" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
56 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
57 |
echo % Convert |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
58 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
59 |
cd .. |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
60 |
hg convert src | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
61 |
|
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
62 |
echo % Check the result |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
63 |
|
8523
5b7da468531b
tests: replace #...# syntax with {...}
Martin Geisler <mg@lazybytes.net>
parents:
8350
diff
changeset
|
64 |
hg -R src-hg glog --template '{rev} ({branches}) {desc} files: {files}\n' |