##// END OF EJS Templates
patch: remove applydiff() useless updatedir and rejmerge arguments
patch: remove applydiff() useless updatedir and rejmerge arguments

File last commit:

r6851:6ec941b6 default
r7147:94cf0d1f default
Show More
test-convert-svn-branches
98 lines | 2.1 KiB | text/plain | TextLexer
/ tests / test-convert-svn-branches
Patrick Mezard
Test subversion branches conversion
r5874 #!/bin/sh
"$TESTDIR/hghave" svn svn-bindings || exit 80
fix_path()
{
tr '\\' /
}
echo "[extensions]" >> $HGRCPATH
echo "convert = " >> $HGRCPATH
echo "hgext.graphlog =" >> $HGRCPATH
svnadmin create svn-repo
svnpath=`pwd | fix_path`
# SVN wants all paths to start with a slash. Unfortunately,
# Windows ones don't. Handle that.
expr $svnpath : "\/" > /dev/null
if [ $? -ne 0 ]; then
svnpath='/'$svnpath
fi
echo % initial svn import
mkdir projA
cd projA
mkdir trunk
mkdir branches
mkdir tags
cd ..
svnurl=file://$svnpath/svn-repo/projA
svn import -m "init projA" projA $svnurl | fix_path
echo % update svn repository
svn co $svnurl A | fix_path
cd A
Patrick Mezard
test-convert-svn-branches: short identifiers are more legible
r6537 echo a > trunk/a
echo b > trunk/b
echo c > trunk/c
Patrick Mezard
convert: check svn branches are directories
r6491 # Add a file within branches, used to confuse branch detection
Patrick Mezard
test-convert-svn-branches: short identifiers are more legible
r6537 echo d > branches/notinbranch
svn add trunk/a trunk/b trunk/c branches/notinbranch
Patrick Mezard
Test subversion branches conversion
r5874 svn ci -m hello
Patrick Mezard
test-convert-svn-branches: short identifiers are more legible
r6537 echo % branch to old
Patrick Mezard
Test subversion branches conversion
r5874 svn copy trunk branches/old
Patrick Mezard
test-convert-svn-branches: short identifiers are more legible
r6537 svn rm branches/old/c
svn ci -m "branch trunk, remove c"
Patrick Mezard
Test subversion branches conversion
r5874 svn up
echo % update trunk
Patrick Mezard
test-convert-svn-branches: short identifiers are more legible
r6537 "$TESTDIR/svn-safe-append.py" a trunk/a
svn ci -m "change a"
Patrick Mezard
Test subversion branches conversion
r5874
echo % update old branch
Patrick Mezard
test-convert-svn-branches: short identifiers are more legible
r6537 "$TESTDIR/svn-safe-append.py" b branches/old/b
svn ci -m "change b"
Patrick Mezard
Test subversion branches conversion
r5874
echo % create a cross-branch revision
Patrick Mezard
Fix subversion tests with svn 1.5
r6851 svn move trunk/b branches/old/c
Patrick Mezard
test-convert-svn-branches: short identifiers are more legible
r6537 "$TESTDIR/svn-safe-append.py" c branches/old/c
svn ci -m "move and update c"
Patrick Mezard
Test subversion branches conversion
r5874
echo % update old branch again
Patrick Mezard
test-convert-svn-branches: short identifiers are more legible
r6537 "$TESTDIR/svn-safe-append.py" b branches/old/b
svn ci -m "change b again"
Patrick Mezard
Test subversion branches conversion
r5874
Patrick Mezard
convert: improve subversion branch filtering
r6540 echo % move back and forth between branch of similar names
# This used to generate fake copy records
svn up
svn move branches/old branches/old2
svn ci -m "move to old2"
svn move branches/old2 branches/old
svn ci -m "move back to old"
Patrick Mezard
Test subversion branches conversion
r5874 echo % update trunk again
Patrick Mezard
test-convert-svn-branches: short identifiers are more legible
r6537 "$TESTDIR/svn-safe-append.py" a trunk/a
svn ci -m "last change to a"
Patrick Mezard
Test subversion branches conversion
r5874 cd ..
echo % convert trunk and branches
hg convert --datesort $svnurl A-hg
echo % branch again from a converted revision
cd A
Patrick Mezard
convert: improve subversion branch filtering
r6540 svn copy -r 1 $svnurl/trunk branches/old3
svn ci -m "branch trunk@1 into old3"
Patrick Mezard
Test subversion branches conversion
r5874 cd ..
echo % convert again
hg convert --datesort $svnurl A-hg
cd A-hg
Patrick Mezard
convert: improve subversion branch filtering
r6540 hg glog --template 'branch=#branches# #rev# #desc|firstline# files: #files#\n'
Patrick Mezard
Test subversion branches conversion
r5874 hg branches | sed 's/:.*/:/'
hg tags -q
cd ..