2008-06-24 04:17:36 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (c) 2008 Jan Krüger
|
|
|
|
#
|
|
|
|
|
2008-09-08 14:02:08 +04:00
|
|
|
test_description='git svn respects rewriteRoot during rebuild'
|
2008-06-24 04:17:36 +04:00
|
|
|
|
|
|
|
. ./lib-git-svn.sh
|
|
|
|
|
|
|
|
mkdir import
|
2010-09-06 22:39:54 +04:00
|
|
|
(cd import
|
2008-06-24 04:17:36 +04:00
|
|
|
touch foo
|
2009-05-08 12:06:16 +04:00
|
|
|
svn_cmd import -m 'import for git svn' . "$svnrepo" >/dev/null
|
2010-09-06 22:39:54 +04:00
|
|
|
)
|
2008-06-24 04:17:36 +04:00
|
|
|
rm -rf import
|
|
|
|
|
|
|
|
test_expect_success 'init, fetch and checkout repository' '
|
|
|
|
git svn init --rewrite-root=http://invalid.invalid/ "$svnrepo" &&
|
2010-10-31 04:46:54 +03:00
|
|
|
git svn fetch &&
|
2016-05-13 23:47:14 +03:00
|
|
|
git checkout -b mybranch remotes/git-svn
|
2008-06-24 04:17:36 +04:00
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'remove rev_map' '
|
|
|
|
rm "$GIT_SVN_DIR"/.rev_map.*
|
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'rebuild rev_map' '
|
|
|
|
git svn rebase >/dev/null
|
|
|
|
'
|
|
|
|
|
|
|
|
test_done
|
|
|
|
|