Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t9128-git-svn-cmd-branch.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t9128-git-svn-cmd-branch.sh` 79 lines ยท 2150 bytes Raw Blame History 1 #!/bin/sh 2 # 3 # Copyright (c) 2008 Deskin Miller 4 # 5 6 test_description='git svn partial-rebuild tests' 7 8 . ./lib-git-svn.sh 9 10 test_expect_success 'initialize svnrepo' ' 11 mkdir import && 12 ( 13 (cd import && 14 mkdir trunk branches tags && 15 (cd trunk && 16 echo foo > foo 17 ) && 18 svn_cmd import -m "import for git-svn" . "$svnrepo" >/dev/null 19 ) && 20 rm -rf import && 21 svn_cmd co "$svnrepo"/trunk trunk && 22 (cd trunk && 23 echo bar >> foo && 24 svn_cmd ci -m "updated trunk" 25 ) && 26 rm -rf trunk 27 ) 28 ' 29 30 test_expect_success 'import into git' ' 31 git svn init --stdlayout "$svnrepo" && 32 git svn fetch && 33 git checkout remotes/origin/trunk 34 ' 35 36 test_expect_success 'git svn branch tests' ' 37 git svn branch a && 38 base=$(git rev-parse HEAD:) && 39 test $base = $(git rev-parse remotes/origin/a:) && 40 git svn branch -m "created branch b blah" b && 41 test $base = $(git rev-parse remotes/origin/b:) && 42 test_must_fail git branch -m "no branchname" && 43 git svn branch -n c && 44 test_must_fail git rev-parse remotes/origin/c && 45 test_must_fail git svn branch a && 46 git svn branch -t tag1 && 47 test $base = $(git rev-parse remotes/origin/tags/tag1:) && 48 git svn branch --tag tag2 && 49 test $base = $(git rev-parse remotes/origin/tags/tag2:) && 50 git svn tag tag3 && 51 test $base = $(git rev-parse remotes/origin/tags/tag3:) && 52 git svn tag -m "created tag4 foo" tag4 && 53 test $base = $(git rev-parse remotes/origin/tags/tag4:) && 54 test_must_fail git svn tag -m "no tagname" && 55 git svn tag -n tag5 && 56 test_must_fail git rev-parse remotes/origin/tags/tag5 && 57 test_must_fail git svn tag tag1 58 ' 59 60 test_expect_success 'branch uses correct svn-remote' ' 61 (svn_cmd co "$svnrepo" svn && 62 cd svn && 63 mkdir mirror && 64 svn_cmd add mirror && 65 svn_cmd copy trunk mirror/ && 66 svn_cmd copy tags mirror/ && 67 svn_cmd copy branches mirror/ && 68 svn_cmd ci -m "made mirror" ) && 69 rm -rf svn && 70 git svn init -s -R mirror --prefix=mirror/ "$svnrepo"/mirror && 71 git svn fetch -R mirror && 72 git checkout mirror/trunk && 73 base=$(git rev-parse HEAD:) && 74 git svn branch -m "branch in mirror" d && 75 test $base = $(git rev-parse remotes/mirror/d:) && 76 test_must_fail git rev-parse remotes/d 77 ' 78 79 test_done