Merge branch 'jk/execv-dashed-external'
[git/raj.git] / t / t9158-git-svn-mergeinfo.sh
bloba875b4510270aa8411ab5ee546223be49a1fd65b
1 #!/bin/sh
3 # Copyright (c) 2010 Steven Walter
6 test_description='git svn mergeinfo propagation'
8 . ./lib-git-svn.sh
10 test_expect_success 'initialize source svn repo' '
11 svn_cmd mkdir -m x "$svnrepo"/trunk &&
12 svn_cmd co "$svnrepo"/trunk "$SVN_TREE" &&
14 cd "$SVN_TREE" &&
15 touch foo &&
16 svn_cmd add foo &&
17 svn_cmd commit -m "initial commit"
18 ) &&
19 rm -rf "$SVN_TREE"
22 test_expect_success 'clone svn repo' '
23 git svn init "$svnrepo"/trunk &&
24 git svn fetch
27 test_expect_success 'change svn:mergeinfo' '
28 touch bar &&
29 git add bar &&
30 git commit -m "bar" &&
31 git svn dcommit --mergeinfo="/branches/foo:1-10"
34 test_expect_success 'verify svn:mergeinfo' '
35 mergeinfo=$(svn_cmd propget svn:mergeinfo "$svnrepo"/trunk) &&
36 test "$mergeinfo" = "/branches/foo:1-10"
39 test_expect_success 'change svn:mergeinfo multiline' '
40 touch baz &&
41 git add baz &&
42 git commit -m "baz" &&
43 git svn dcommit --mergeinfo="/branches/bar:1-10 /branches/other:3-5,8,10-11"
46 test_expect_success 'verify svn:mergeinfo multiline' '
47 mergeinfo=$(svn_cmd propget svn:mergeinfo "$svnrepo"/trunk) &&
48 test "$mergeinfo" = "/branches/bar:1-10
49 /branches/other:3-5,8,10-11"
52 test_done