view tests/test-convert-cvs-synthetic @ 8008:36924a4711e9

commands, i18n: avoid untranslated strings as message parameters
author Wagner Bruna <wbruna@yahoo.com>
date Sun, 05 Apr 2009 05:11:46 -0300
parents 02981000012e
children 6c3b8132078e
line wrap: on
line source

#!/bin/sh

# This feature requires use of builtin cvsps!
"$TESTDIR/hghave" cvs || exit 80

# XXX lots of duplication with other test-convert-cvs* scripts

set -e

echo "[extensions]" >> $HGRCPATH
echo "convert = " >> $HGRCPATH
echo "[convert]" >> $HGRCPATH
echo "cvsps=builtin" >> $HGRCPATH

echo % create cvs repository with one project
mkdir cvsrepo
cd cvsrepo
export CVSROOT=`pwd`
export CVS_OPTIONS=-f
cd ..

filter='sed "s:$CVSROOT:*REPO*:g"'
cvscall()
{
    cvs -f "$@" | eval $filter
}

cvscall -q -d "$CVSROOT" init
mkdir cvsrepo/proj

cvscall co proj

echo % create file1 on the trunk
cd proj
touch file1
cvscall add file1
cvscall ci -m"add file1 on trunk" file1

echo % create two branches
cvscall tag -b v1_0
cvscall tag -b v1_1

echo % create file2 on branch v1_0
cvs up -rv1_0
touch file2
cvscall add file2
cvscall ci -m"add file2 on branch v1_0" file2

echo % create file3, file4 on branch v1_1
cvs up -rv1_1
touch file3
touch file4
cvscall add file3 file4
cvscall ci -m"add file3, file4 on branch v1_1" file3 file4

echo % merge file2 from v1_0 to v1_1
cvscall up -jv1_0
cvscall ci -m"merge file2 from v1_0 to v1_1"

echo % convert to hg
cd ..
hg convert proj proj.hg | eval $filter

echo % hg log output
hg -R proj.hg log --template "{rev} {desc}\n"