1#!/bin/sh
2#
3# Copyright (c) 2010 Steven Walter
4#
56
test_description='git svn mergeinfo propagation'
78
. ./lib-git-svn.sh
910
say 'define NO_SVN_TESTS to skip git svn tests'
1112
test_expect_success 'initialize source svn repo' '
13svn_cmd mkdir -m x "$svnrepo"/trunk &&
14svn_cmd co "$svnrepo"/trunk "$SVN_TREE" &&
15(
16cd "$SVN_TREE" &&
17touch foo &&
18svn_cmd add foo &&
19svn_cmd commit -m "initial commit"
20) &&
21rm -rf "$SVN_TREE"
22'
2324
test_expect_success 'clone svn repo' '
25git svn init "$svnrepo"/trunk &&
26git svn fetch
27'
2829
test_expect_success 'change svn:mergeinfo' '
30touch bar &&
31git add bar &&
32git commit -m "bar" &&
33git svn dcommit --mergeinfo="/branches/foo:1-10"
34'
3536
test_expect_success 'verify svn:mergeinfo' '
37mergeinfo=$(svn_cmd propget svn:mergeinfo "$svnrepo"/trunk)
38test "$mergeinfo" = "/branches/foo:1-10"
39'
4041
test_expect_success 'change svn:mergeinfo multiline' '
42touch baz &&
43git add baz &&
44git commit -m "baz" &&
45git svn dcommit --mergeinfo="/branches/bar:1-10 /branches/other:3-5,8,10-11"
46'
4748
test_expect_success 'verify svn:mergeinfo multiline' '
49mergeinfo=$(svn_cmd propget svn:mergeinfo "$svnrepo"/trunk)
50test "$mergeinfo" = "/branches/bar:1-10
51/branches/other:3-5,8,10-11"
52'
5354
test_done