remote-hg: update bookmarks when using a remote
[git/gitweb.git] / t / t9156-git-svn-fetch-deleted-tag-2.sh
blob5ce7e2f3b0e68c976c873fe11a2aec31897e6e6c
1 #!/bin/sh
3 test_description='git svn fetch deleted tag 2'
5 . ./lib-git-svn.sh
7 test_expect_success 'setup svn repo' '
8 mkdir -p import/branches &&
9 mkdir -p import/tags &&
10 mkdir -p import/trunk/subdir1 &&
11 mkdir -p import/trunk/subdir2 &&
12 mkdir -p import/trunk/subdir3 &&
13 echo "file1" >import/trunk/subdir1/file &&
14 echo "file2" >import/trunk/subdir2/file &&
15 echo "file3" >import/trunk/subdir3/file &&
16 svn_cmd import -m "import for git svn" import "$svnrepo" &&
17 rm -rf import &&
19 svn_cmd co "$svnrepo/trunk" svn_project &&
20 (cd svn_project &&
21 echo "change1" >>subdir1/file &&
22 echo "change2" >>subdir2/file &&
23 echo "change3" >>subdir3/file &&
24 svn_cmd ci -m "change" .
25 ) &&
27 svn_cmd cp -m "create mytag 1" -r2 "$svnrepo/trunk/subdir1" "$svnrepo/tags/mytag" &&
28 svn_cmd rm -m "delete mytag 1" "$svnrepo/tags/mytag" &&
29 svn_cmd cp -m "create mytag 2" -r2 "$svnrepo/trunk/subdir2" "$svnrepo/tags/mytag" &&
30 svn_cmd rm -m "delete mytag 2" "$svnrepo/tags/mytag" &&
31 svn_cmd cp -m "create mytag 3" -r2 "$svnrepo/trunk/subdir3" "$svnrepo/tags/mytag"
34 test_expect_success 'fetch deleted tags from same revision with no checksum error' '
35 git svn init --stdlayout "$svnrepo" git_project &&
36 cd git_project &&
37 git svn fetch &&
39 git diff --exit-code master:subdir3/file tags/mytag:file &&
40 git diff --exit-code master:subdir2/file tags/mytag^:file &&
41 git diff --exit-code master:subdir1/file tags/mytag^^:file
44 test_done