Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ PROPNAME="$4"
ACTION="$5"

if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:date" ]; then exit 0; fi

echo "Changing revision properties other than svn:log is prohibited" >&2
echo "Only svn:log and svn:date revision properties can be changed" >&2
exit 1
15 changes: 15 additions & 0 deletions test/unit/svn_misc_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,21 @@ def test_tags
end
end

def test_tags_with_whitespaces
with_svn_repository('svn', 'trunk') do |source_scm|
OhlohScm::ScratchDir.new do |svn_working_folder|
folder_name = source_scm.root.slice(/[^\/]+\/?\Z/)
system "cd #{ svn_working_folder } && svn co #{ source_scm.root } && cd #{ folder_name } &&
mkdir -p #{ source_scm.root.gsub(/^file:../, '') }/db/transactions
svn copy trunk tags/'HL7 engine' && svn commit -m 'v2.0' && svn update && svn propset svn:date --revprop -r 'HEAD' 2016-02-12T00:44:04.921324Z"

assert_equal(['HL7 engine', '6'], source_scm.tags.first[0..1])
# Avoid millisecond comparision.
assert_equal('2016-02-12', source_scm.tags.first[-1].strftime('%F'))
end
end
end

def test_tags_with_non_tagged_repository
with_svn_repository('svn') do |svn|
assert_equal svn.tags, []
Expand Down