]> git.ipfire.org Git - thirdparty/git.git/blame - t/t9103-git-svn-tracked-directory-removed.sh
test-lib: refactor $GIT_SKIP_TESTS matching
[thirdparty/git.git] / t / t9103-git-svn-tracked-directory-removed.sh
CommitLineData
12a6d752
EW
1#!/bin/sh
2#
3# Copyright (c) 2007 Eric Wong
4#
5
1364ff27 6test_description='git svn tracking removed top-level path'
12a6d752
EW
7. ./lib-git-svn.sh
8
9test_expect_success 'make history for tracking' '
10 mkdir import &&
11 mkdir import/trunk &&
12 echo hello >> import/trunk/README &&
da083d68 13 svn_cmd import -m initial import "$svnrepo" &&
12a6d752 14 rm -rf import &&
da083d68 15 svn_cmd co "$svnrepo"/trunk trunk &&
12a6d752 16 echo bye bye >> trunk/README &&
da083d68 17 svn_cmd rm -m "gone" "$svnrepo"/trunk &&
12a6d752
EW
18 rm -rf trunk &&
19 mkdir trunk &&
20 echo "new" > trunk/FOLLOWME &&
da083d68 21 svn_cmd import -m "new trunk" trunk "$svnrepo"/trunk
12a6d752
EW
22'
23
24test_expect_success 'clone repo with git' '
f69e836f 25 git svn clone -s "$svnrepo" x &&
12a6d752
EW
26 test -f x/FOLLOWME &&
27 test ! -f x/README
28'
29
f69e836f 30test_expect_success 'make sure r2 still has old file' "
12a6d752 31 cd x &&
f69e836f
BD
32 test -n \"\$(git svn find-rev r1)\" &&
33 git reset --hard \$(git svn find-rev r1) &&
12a6d752
EW
34 test -f README &&
35 test ! -f FOLLOWME &&
f69e836f
BD
36 test x\$(git svn find-rev r2) = x
37"
12a6d752
EW
38
39test_done