comparison tests/test-convert-cvs @ 5307:5b0b0834419c

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