comparison tests/test-convert-cvs-branch @ 8756:6019e6517f95

convert: better support for CVS branchpoints (issue1447) This records the branches starting at individual CVS file revisions, using the symbolic names map rather than just the branches information. This information is used to generate Mercurial changesets. Despite the changes, the CVS conversion still suffers heavily from cvsps' deficiencies in generating a correct representation of the CVS repository history.
author Henrik Stuart <hg@hstuart.dk>
date Tue, 09 Jun 2009 08:59:49 +0200
parents 5b7da468531b
children 1de6e7e1bb9f
comparison
equal deleted inserted replaced
8755:a2b4ddee3785 8756:6019e6517f95
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # This is http://www.selenic.com/mercurial/bts/issue1148 3 # This is http://www.selenic.com/mercurial/bts/issue1148
4 # and http://www.selenic.com/mercurial/bts/issue1447
4 5
5 "$TESTDIR/hghave" cvs || exit 80 6 "$TESTDIR/hghave" cvs || exit 80
6 7
7 cvscall() 8 cvscall()
8 { 9 {
60 hg convert src | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' 61 hg convert src | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
61 62
62 echo % Check the result 63 echo % Check the result
63 64
64 hg -R src-hg glog --template '{rev} ({branches}) {desc} files: {files}\n' 65 hg -R src-hg glog --template '{rev} ({branches}) {desc} files: {files}\n'
66
67 echo ""
68
69 echo % issue 1447
70 cvscall()
71 {
72 echo cvs -f "$@"
73 cvs -f "$@"
74 sleep 1
75 }
76
77 cvsci()
78 {
79 echo cvs -f ci "$@"
80 cvs -f ci "$@" >/dev/null 2>&1
81 sleep 1
82 }
83
84 cvscall -Q -d `pwd`/cvsmaster2 init >/dev/null 2>&1
85 cd cvsmaster2
86 export CVSROOT=`pwd`
87 mkdir foo
88 cd ..
89 cvscall -Q co -d cvswork2 foo
90
91 cd cvswork2
92 echo foo > a.txt
93 echo bar > b.txt
94 cvscall -Q add a.txt b.txt
95 cvsci -m "Initial commit"
96
97 echo foo > b.txt
98 cvsci -m "Fix b on HEAD"
99
100 echo bar > a.txt
101 cvsci -m "Small fix in a on HEAD"
102
103 cvscall -Q tag -b BRANCH
104 cvscall -Q up -P -rBRANCH
105
106 echo baz > b.txt
107 cvsci -m "Change on BRANCH in b"
108
109 hg debugcvsps -x --parents foo | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/'
110
111 cd ..
112