]> git.ipfire.org Git - thirdparty/git.git/blob - t/t9158-git-svn-mergeinfo.sh
path.c: don't call the match function without value in trie_find()
[thirdparty/git.git] / t / t9158-git-svn-mergeinfo.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2010 Steven Walter
4 #
5
6 test_description='git svn mergeinfo propagation'
7
8 . ./lib-git-svn.sh
9
10 test_expect_success 'initialize source svn repo' '
11 svn_cmd mkdir -m x "$svnrepo"/trunk &&
12 svn_cmd co "$svnrepo"/trunk "$SVN_TREE" &&
13 (
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"
20 '
21
22 test_expect_success 'clone svn repo' '
23 git svn init "$svnrepo"/trunk &&
24 git svn fetch
25 '
26
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"
32 '
33
34 test_expect_success 'verify svn:mergeinfo' '
35 mergeinfo=$(svn_cmd propget svn:mergeinfo "$svnrepo"/trunk) &&
36 test "$mergeinfo" = "/branches/foo:1-10"
37 '
38
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"
44 '
45
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"
50 '
51
52 test_done