comparison tests/test-convert-cvs-synthetic @ 7862:02981000012e 1.2.1

cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
author Greg Ward <greg-hg@gerg.ca>
date Wed, 18 Mar 2009 09:15:38 -0400
parents
children 6c3b8132078e
comparison
equal deleted inserted replaced
7861:2bc14da14992 7862:02981000012e
1 #!/bin/sh
2
3 # This feature requires use of builtin cvsps!
4 "$TESTDIR/hghave" cvs || exit 80
5
6 # XXX lots of duplication with other test-convert-cvs* scripts
7
8 set -e
9
10 echo "[extensions]" >> $HGRCPATH
11 echo "convert = " >> $HGRCPATH
12 echo "[convert]" >> $HGRCPATH
13 echo "cvsps=builtin" >> $HGRCPATH
14
15 echo % create cvs repository with one project
16 mkdir cvsrepo
17 cd cvsrepo
18 export CVSROOT=`pwd`
19 export CVS_OPTIONS=-f
20 cd ..
21
22 filter='sed "s:$CVSROOT:*REPO*:g"'
23 cvscall()
24 {
25 cvs -f "$@" | eval $filter
26 }
27
28 cvscall -q -d "$CVSROOT" init
29 mkdir cvsrepo/proj
30
31 cvscall co proj
32
33 echo % create file1 on the trunk
34 cd proj
35 touch file1
36 cvscall add file1
37 cvscall ci -m"add file1 on trunk" file1
38
39 echo % create two branches
40 cvscall tag -b v1_0
41 cvscall tag -b v1_1
42
43 echo % create file2 on branch v1_0
44 cvs up -rv1_0
45 touch file2
46 cvscall add file2
47 cvscall ci -m"add file2 on branch v1_0" file2
48
49 echo % create file3, file4 on branch v1_1
50 cvs up -rv1_1
51 touch file3
52 touch file4
53 cvscall add file3 file4
54 cvscall ci -m"add file3, file4 on branch v1_1" file3 file4
55
56 echo % merge file2 from v1_0 to v1_1
57 cvscall up -jv1_0
58 cvscall ci -m"merge file2 from v1_0 to v1_1"
59
60 echo % convert to hg
61 cd ..
62 hg convert proj proj.hg | eval $filter
63
64 echo % hg log output
65 hg -R proj.hg log --template "{rev} {desc}\n"