##// END OF EJS Templates
ui: refactor option setting...
ui: refactor option setting No more passing options as constructor keywords. Basic options are now always stored in the overlay for simplicity and consistency.

File last commit:

r8081:6c3b8132 default
r8136:6b5522cb default
Show More
test-convert-cvs-synthetic
78 lines | 1.4 KiB | text/plain | TextLexer
/ tests / test-convert-cvs-synthetic
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862 #!/bin/sh
# This feature requires use of builtin cvsps!
"$TESTDIR/hghave" cvs || exit 80
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 ..
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 filterpath()
{
eval "$@" | sed "s:$CVSROOT:*REPO*:g"
}
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862 cvscall()
{
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 echo cvs -f "$@"
cvs -f "$@" 2>&1
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862 }
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 # output of 'cvs ci' varies unpredictably, so just discard it
cvsci()
{
echo cvs -f ci "$@"
cvs -f ci "$@" >/dev/null 2>&1
}
filterpath cvscall -d "$CVSROOT" init
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862 mkdir cvsrepo/proj
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 cvscall -q co proj
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862
echo % create file1 on the trunk
cd proj
touch file1
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 cvscall -Q add file1
cvsci -m"add file1 on trunk" file1
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862
echo % create two branches
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 cvscall -q tag -b v1_0
cvscall -q tag -b v1_1
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862
echo % create file2 on branch v1_0
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 cvscall -q up -rv1_0
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862 touch file2
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 cvscall -Q add file2
cvsci -m"add file2 on branch v1_0" file2
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862
echo % create file3, file4 on branch v1_1
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 cvscall -Q up -rv1_1
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862 touch file3
touch file4
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 cvscall -Q add file3 file4
cvsci -m"add file3, file4 on branch v1_1" file3 file4
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862
echo % merge file2 from v1_0 to v1_1
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 cvscall -q up -jv1_0
cvsci -m"merge file2 from v1_0 to v1_1"
echo % cvs rlog output
filterpath cvscall -q rlog proj | egrep '^(RCS file|revision)'
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862
echo % convert to hg
cd ..
Greg Ward
issue1577: fix broken test by assuming less about CVS output....
r8081 filterpath hg convert proj proj.hg
Greg Ward
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
r7862
echo % hg log output
hg -R proj.hg log --template "{rev} {desc}\n"