swh:1:snp:6df5a50b8107b6bbe1e51d0239d816a7503c536a
Raw File
Tip revision: e267c2f6f0784e242883b7d3fe5f36ef63d6950d authored by Junio C Hamano on 15 November 2006, 06:11:26 UTC
GIT 1.4.4
Tip revision: e267c2f
t9104-git-svn-follow-parent.sh
#!/bin/sh
#
# Copyright (c) 2006 Eric Wong
#

test_description='git-svn --follow-parent fetching'
. ./lib-git-svn.sh

if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0
then
	echo 'Skipping: --follow-parent needs SVN libraries'
	test_done
	exit 0
fi

test_expect_success 'initialize repo' "
	mkdir import &&
	cd import &&
	mkdir -p trunk &&
	echo hello > trunk/readme &&
	svn import -m 'initial' . $svnrepo &&
	cd .. &&
	svn co $svnrepo wc &&
	cd wc &&
	echo world >> trunk/readme &&
	svn commit -m 'another commit' &&
	svn up &&
	svn mv -m 'rename to thunk' trunk thunk &&
	svn up &&
	echo goodbye >> thunk/readme &&
	svn commit -m 'bye now' &&
	cd ..
	"

test_expect_success 'init and fetch --follow-parent a moved directory' "
	git-svn init -i thunk $svnrepo/thunk &&
	git-svn fetch --follow-parent -i thunk &&
	git-rev-parse --verify refs/remotes/trunk &&
	test '$?' -eq '0'
	"

test_debug 'gitk --all &'

test_done
back to top