annotate tests/test-convert-cvs-builtincvsps @ 6690:127e8c3466d1

convert: cvs.py - Allow user to use built-in CVS changeset code. tests: add two testcases for CVS conversion with builtin CVS including a testcase for issue 1148.
author Frank Kingswood <frank@kingswood-consulting.co.uk>
date Sun, 15 Jun 2008 16:05:46 +0100
parents
children 2011bb8ada9a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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 "$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
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 cvscall()
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 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
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
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
10 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
11 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
12 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
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 "cvsps=builtin" >> $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
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 % 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
17 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
18 cd cvsrepo
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
19 export CVSROOT=`pwd`
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
20 export CVS_OPTIONS=-f
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 ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
22
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
23 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
24
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
25 echo % create source directory
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
26 mkdir src-temp
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
27 cd src-temp
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
28 echo a > a
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
29 mkdir b
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
30 cd b
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
31 echo c > c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
32 cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
33
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
34 echo % import source directory
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
35 cvscall -q import -m import src INITIAL start
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
36 cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
37
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
38 echo % checkout source directory
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
39 cvscall -q checkout 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 % commit a new revision changing b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
42 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
43 sleep 1
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
44 echo c >> b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
45 cvscall -q commit -mci0 . | grep '<--' |\
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
46 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
47 cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
48
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
49 echo % convert fresh repo
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
50 hg convert src src-hg | 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
51 cat src-hg/a
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
52 cat src-hg/b/c
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 % convert fresh repo with --filemap
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
55 echo include b/c > filemap
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
56 hg convert --filemap filemap src src-filemap | 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
57 cat src-hg/b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
58 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
59
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
60 echo % commit new file revisions
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
61 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
62 echo a >> a
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
63 echo c >> b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
64 cvscall -q commit -mci1 . | grep '<--' |\
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
65 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
66 cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
67
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
68 echo % convert again
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
69 hg convert src src-hg | 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
70 cat src-hg/a
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
71 cat src-hg/b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
72
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
73 echo % convert again with --filemap
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
74 hg convert --filemap filemap src src-filemap | 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
75 cat src-hg/b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
76 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
77
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
78 echo % commit branch
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
79 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
80 cvs -q update -r1.1 b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
81 cvs -q tag -b branch
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
82 cvs -q update -r branch
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
83 echo d >> b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
84 cvs -q commit -mci2 . | grep '<--' |\
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
85 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
86 cd ..
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
87
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
88 echo % convert again
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
89 hg convert src src-hg | 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
90 cat src-hg/a
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
91 cat src-hg/b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
92
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
93 echo % convert again with --filemap
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
94 hg convert --filemap filemap src src-filemap | 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
95 cat src-hg/b/c
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
96 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
97
127e8c3466d1 convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff changeset
98 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
99 hg -R src-hg glog --template '#rev# (#branches#) #desc# files: #files#\n'