author | Patrick Mezard <pmezard@gmail.com> |
Sun, 23 Sep 2007 18:24:19 +0200 | |
changeset 5324 | 8409a2e3a78d |
parent 5307 | 5b0b0834419c |
child 5364 | 645a40777fd4 |
permissions | -rwxr-xr-x |
5307
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 |
#!/bin/sh |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
2 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
3 |
"$TESTDIR/hghave" cvs cvsps || exit 80 |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
4 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
5 |
echo "[extensions]" >> $HGRCPATH |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
6 |
echo "convert = " >> $HGRCPATH |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
7 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
8 |
echo % create cvs repository |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
9 |
mkdir cvsrepo |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
10 |
cd cvsrepo |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 |
export CVSROOT=`pwd` |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
12 |
cd .. |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
13 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
14 |
cvs -q -d "$CVSROOT" init |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
15 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
16 |
echo % create source directory |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
17 |
mkdir src-temp |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
18 |
cd src-temp |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
19 |
echo a > a |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
20 |
mkdir b |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
21 |
cd b |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
22 |
echo c > c |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
23 |
cd .. |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
24 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
25 |
echo % import source directory |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
26 |
cvs -q import -m import src INITIAL start |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
27 |
cd .. |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
28 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
29 |
echo % checkout source directory |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
30 |
cvs -q checkout src |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
31 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
32 |
echo % convert fresh repo |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
33 |
hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
34 |
cat src-hg/a |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
35 |
cat src-hg/b/c |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
36 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
37 |
echo % commit new file revisions |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
38 |
cd src |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
39 |
echo a >> a |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
40 |
echo c >> b/c |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
41 |
cvs -q commit -mci1 . | sed -e 's:.*src/\(.*\),v:src/\1,v:g' |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
42 |
cd .. |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
43 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
44 |
echo % convert again |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
45 |
hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
46 |
cat src-hg/a |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
47 |
cat src-hg/b/c |
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
48 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
49 |
|
5b0b0834419c
convert: test cvs repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
50 |