#!/bin/bash

if [ -z "${1}" ]; then
  echo -e "Usage: $0 <test-path>\n<test-path> must be absolute and WILL BE DELETED!"
  exit 1
fi

# Setup
rm -rf "${1}"
mkdir "${1}"
svnadmin create "${1}/repo"
svn co "file:///${1}/repo" "${1}/wc"
svn mkdir "${1}/wc/a"
svn ci -m "" "${1}/wc"
svn mkdir "${1}/wc/b"
svn ci -m "" "${1}/wc"


# This works
svn switch -r 2 "file:///${1}/repo/a" "${1}/wc/b"

# This should be doing the same, but fails
svn switch -r BASE "file:///${1}/repo/a" "${1}/wc/b"

