summaryrefslogtreecommitdiff
path: root/t/t9158-git-svn-mergeinfo.sh
diff options
context:
space:
mode:
authorSteven Walter <stevenrwalter@gmail.com>2010-09-24 23:51:50 -0400
committerEric Wong <normalperson@yhbt.net>2010-12-10 04:09:48 +0800
commit6abd9332f97441a568421ba233ad8929b50a7efc (patch)
treea994da4240223df04e619a0d9efc619cc86cc060 /t/t9158-git-svn-mergeinfo.sh
parentf80b6de4eca9c4c4abfe9407736311de27726e53 (diff)
downloadgit-6abd9332f97441a568421ba233ad8929b50a7efc.tar.gz
git-svn: allow the mergeinfo property to be set
As a first step towards preserving merges across dcommit, we need a mechanism to update the svn:mergeinfo property. [ew: fixed bashism and style issues in test case] Signed-off-by: Steven Walter <stevenrwalter@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't/t9158-git-svn-mergeinfo.sh')
-rw-r--r--t/t9158-git-svn-mergeinfo.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/t/t9158-git-svn-mergeinfo.sh b/t/t9158-git-svn-mergeinfo.sh
new file mode 100644
index 0000000000..3ab43902b3
--- /dev/null
+++ b/t/t9158-git-svn-mergeinfo.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Steven Walter
+#
+
+test_description='git svn mergeinfo propagation'
+
+. ./lib-git-svn.sh
+
+say 'define NO_SVN_TESTS to skip git svn tests'
+
+test_expect_success 'initialize source svn repo' '
+ svn_cmd mkdir -m x "$svnrepo"/trunk &&
+ svn_cmd co "$svnrepo"/trunk "$SVN_TREE" &&
+ (
+ cd "$SVN_TREE" &&
+ touch foo &&
+ svn_cmd add foo &&
+ svn_cmd commit -m "initial commit"
+ ) &&
+ rm -rf "$SVN_TREE"
+'
+
+test_expect_success 'clone svn repo' '
+ git svn init "$svnrepo"/trunk &&
+ git svn fetch
+'
+
+test_expect_success 'change svn:mergeinfo' '
+ touch bar &&
+ git add bar &&
+ git commit -m "bar" &&
+ git svn dcommit --mergeinfo="/branches/foo:1-10"
+'
+
+test_expect_success 'verify svn:mergeinfo' '
+ mergeinfo=$(svn_cmd propget svn:mergeinfo "$svnrepo"/trunk)
+ test "$mergeinfo" = "/branches/foo:1-10"
+'
+
+test_done