Code

Merge branch 'jn/diffstat-tests'
[git.git] / t / t9144-git-svn-old-rev_map.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2009 Eric Wong
5 test_description='git svn old rev_map preservd'
6 . ./lib-git-svn.sh
8 test_expect_success 'setup test repository with old layout' '
9         mkdir i &&
10         (cd i && > a) &&
11         svn_cmd import -m- i "$svnrepo" &&
12         git svn init "$svnrepo" &&
13         git svn fetch &&
14         test -d .git/svn/refs/remotes/git-svn/ &&
15         ! test -e .git/svn/git-svn/ &&
16         mv .git/svn/refs/remotes/git-svn .git/svn/ &&
17         rm -r .git/svn/refs
18 '
20 test_expect_success 'old layout continues to work' '
21         svn_cmd import -m- i "$svnrepo/b" &&
22         git svn rebase &&
23         echo a >> b/a &&
24         git add b/a &&
25         git commit -m- -a &&
26         git svn dcommit &&
27         ! test -d .git/svn/refs/ &&
28         test -e .git/svn/git-svn/
29 '
31 test_done