#!/bin/csh

# Set this to the location of your repository.
# A file: URL will pass the test.
# A svn: URL will fail the test (in subversion 1.0.5).
set repository="svn://whirlwind"

# Create a test directory with spaces in the name and import it
# into the repository.
set echo
mkdir "svn space test"
echo foo > "svn space test/foo"
svn import "svn space test" $repository/svn%20space%20test -m "initial import"

# Record the current date so we can use it in diff later.
sleep 10
set startDate=`date "+%Y-%m-%d %H:%M:%S"`
sleep 10

# Make a trivial change
rm -rf "svn space test"
svn checkout $repository/svn%20space%20test
echo bar > "svn space test/foo"
svn commit "svn space test" -m "trivial change"

# This is the command that gets an error with the svn: protocol.
svn diff -r "{$startDate}:HEAD" $repository/svn%20space%20test

# Clean up
svn delete $repository/svn%20space%20test -m "cleaning up"
rm -rf "svn space test"

