Mercurial > hg
comparison tests/test-convert-cvs @ 5750:206b44764340
test-convert-cvs: force cvs -f options to avoid cvsrc
There are some reference to a CVS_OPTIONS environment variable doing that but
it does not work on my system (cvs 1.11.20, macosx).
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Thu, 27 Dec 2007 19:23:22 +0100 |
parents | 98f45e141567 |
children | 549a7ebe1607 |
comparison
equal
deleted
inserted
replaced
5749:4fba4fee0718 | 5750:206b44764340 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 "$TESTDIR/hghave" cvs cvsps || exit 80 | 3 "$TESTDIR/hghave" cvs cvsps || exit 80 |
4 | |
5 cvscall() | |
6 { | |
7 cvs -f $@ | |
8 } | |
4 | 9 |
5 echo "[extensions]" >> $HGRCPATH | 10 echo "[extensions]" >> $HGRCPATH |
6 echo "convert = " >> $HGRCPATH | 11 echo "convert = " >> $HGRCPATH |
7 | 12 |
8 echo % create cvs repository | 13 echo % create cvs repository |
10 cd cvsrepo | 15 cd cvsrepo |
11 export CVSROOT=`pwd` | 16 export CVSROOT=`pwd` |
12 export CVS_OPTIONS=-f | 17 export CVS_OPTIONS=-f |
13 cd .. | 18 cd .. |
14 | 19 |
15 cvs -q -d "$CVSROOT" init | 20 cvscall -q -d "$CVSROOT" init |
16 | 21 |
17 echo % create source directory | 22 echo % create source directory |
18 mkdir src-temp | 23 mkdir src-temp |
19 cd src-temp | 24 cd src-temp |
20 echo a > a | 25 echo a > a |
22 cd b | 27 cd b |
23 echo c > c | 28 echo c > c |
24 cd .. | 29 cd .. |
25 | 30 |
26 echo % import source directory | 31 echo % import source directory |
27 cvs -q import -m import src INITIAL start | 32 cvscall -q import -m import src INITIAL start |
28 cd .. | 33 cd .. |
29 | 34 |
30 echo % checkout source directory | 35 echo % checkout source directory |
31 cvs -q checkout src | 36 cvscall -q checkout src |
32 | 37 |
33 echo % commit a new revision changing b/c | 38 echo % commit a new revision changing b/c |
34 cd src | 39 cd src |
35 echo c >> b/c | 40 echo c >> b/c |
36 cvs -q commit -mci0 . | grep '<--' |\ | 41 cvscall -q commit -mci0 . | grep '<--' |\ |
37 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' | 42 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
38 cd .. | 43 cd .. |
39 | 44 |
40 echo % convert fresh repo | 45 echo % convert fresh repo |
41 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' | 46 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |
50 | 55 |
51 echo % commit new file revisions | 56 echo % commit new file revisions |
52 cd src | 57 cd src |
53 echo a >> a | 58 echo a >> a |
54 echo c >> b/c | 59 echo c >> b/c |
55 cvs -q commit -mci1 . | grep '<--' |\ | 60 cvscall -q commit -mci1 . | grep '<--' |\ |
56 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' | 61 sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
57 cd .. | 62 cd .. |
58 | 63 |
59 echo % convert again | 64 echo % convert again |
60 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' | 65 hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |