3 # Copyright (c) 2014 Alfred Perlstein
6 test_description='git svn propset tests'
10 foo_subdir2="subdir/subdir2/foo_subdir2"
17 touch foo # for 'add props top level'
18 touch subdir/foo_subdir # for 'add props relative'
19 touch "$foo_subdir2" # for 'add props subdir'
20 svn_cmd import -m 'import for git svn' . "$svnrepo" >/dev/null
24 test_expect_success 'initialize git svn' '
25 git svn init "$svnrepo"
28 test_expect_success 'fetch revisions from svn' '
37 while [ $# -gt 0 ] ; do
38 git svn propset "$1" "$2" "$file" || exit 1
41 echo hello >> "$file" &&
42 git commit -m "testing propset" "$file")
49 (set -e ; cd "svn_project/$subdir" &&
50 while [ $# -gt 0 ] ; do
51 test "$(svn_cmd propget "$1" "$file")" = "$2" || exit 1
57 #The current implementation has a restriction:
58 #svn propset will be taken as a delta for svn dcommit only
59 #if the file content is also modified
60 test_expect_success 'add props top level' '
61 set_props "." "foo" "svn:keywords" "FreeBSD=%H" &&
63 svn_cmd co "$svnrepo" svn_project &&
64 confirm_props "." "foo" "svn:keywords" "FreeBSD=%H" &&
68 test_expect_success 'add multiple props' '
70 "svn:keywords" "FreeBSD=%H" fbsd:nokeywords yes &&
72 svn_cmd co "$svnrepo" svn_project &&
73 confirm_props "." "foo" \
74 "svn:keywords" "FreeBSD=%H" fbsd:nokeywords yes &&
78 test_expect_success 'add props subdir' '
79 set_props "." "$foo_subdir2" svn:keywords "FreeBSD=%H" &&
81 svn_cmd co "$svnrepo" svn_project &&
82 confirm_props "." "$foo_subdir2" "svn:keywords" "FreeBSD=%H" &&
86 test_expect_success 'add props relative' '
87 set_props "subdir/subdir2" "../foo_subdir" \
88 svn:keywords "FreeBSD=%H" &&
90 svn_cmd co "$svnrepo" svn_project &&
91 confirm_props "subdir/subdir2" "../foo_subdir" \
92 svn:keywords "FreeBSD=%H" &&