#!/bin/sh # # Copyright (c) 2010 Jay Soffian # global test_description := ''git svn --rewrite-uuid test'' source ./lib-git-svn.sh global uuid := '6cc8ada4-5932-4b4a-8242-3534ed8a3232' test_expect_success 'load svn repo' " svnadmin load -q '$rawsvnrepo' < '$TEST_DIRECTORY/t9153/svn.dump' && git svn init --minimize-url --rewrite-uuid='$uuid' '$svnrepo' && git svn fetch " test_expect_success 'verify uuid' " git cat-file commit refs/remotes/git-svn~0 | \ grep '^git-svn-id: .*@2 $uuid$' && git cat-file commit refs/remotes/git-svn~1 | \ grep '^git-svn-id: .*@1 $uuid$' " test_done (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"git svn --rewrite-uuid test">)} spids: [13] ) ] spids: [13] ) (C {(.)} {(./lib-git-svn.sh)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:uuid) op: Equal rhs: {(6cc8ada4-5932-4b4a-8242-3534ed8a3232)} spids: [24] ) ] spids: [24] ) (C {(test_expect_success)} {(SQ <"load svn repo">)} { (DQ ("\n") ("\tsvnadmin load -q '") ($ VSub_Name "$rawsvnrepo") ("' < '") ($ VSub_Name "$TEST_DIRECTORY") ("/t9153/svn.dump' &&\n") ("\tgit svn init --minimize-url --rewrite-uuid='") ($ VSub_Name "$uuid") ("' '") ($ VSub_Name "$svnrepo") ("' &&\n") ("\tgit svn fetch\n") ("\t") ) } ) (C {(test_expect_success)} {(SQ <"verify uuid">)} { (DQ ("\n") ("\tgit cat-file commit refs/remotes/git-svn~0 | ") ("\t grep '^git-svn-id: .*@2 ") ($ VSub_Name "$uuid") (Lit_Other "$") ("' &&\n") ("\tgit cat-file commit refs/remotes/git-svn~1 | ") ("\t grep '^git-svn-id: .*@1 ") ($ VSub_Name "$uuid") (Lit_Other "$") ("'\n") ("\t") ) } ) (C {(test_done)}) ] )