Raw
1 #!/bin/sh
2 #
3 # Copyright (c) 2008 Jan Krüger
4 #
5
6 test_description='git svn respects rewriteRoot during rebuild'
7
8 . ./lib-git-svn.sh
9
10 test_expect_success 'setup svn repository' '
11 test_when_finished "rm -rf import" &&
12 mkdir import &&
13 (
14 cd import &&
15 touch foo &&
16 svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null
17 )
18 '
19
20 test_expect_success 'init, fetch and checkout repository' '
21 git svn init --rewrite-root=http://invalid.invalid/ "$svnrepo" &&
22 git svn fetch &&
23 git checkout -b mybranch remotes/git-svn
24 '
25
26 test_expect_success 'remove rev_map' '
27 rm "$GIT_SVN_DIR"/.rev_map.*
28 '
29
30 test_expect_success 'rebuild rev_map' '
31 git svn rebase >/dev/null
32 '
33
34 test_done
35