#!/bin/sh
#
# demonstrate add/update bug with r3146
#
svnadmin create `pwd`/repos

mkdir foo
touch foo/bar

svn import -m'import' file://`pwd`/repos foo foo

svn checkout file://`pwd`/repos/foo u1
svn checkout file://`pwd`/repos/foo u2

touch u1/baz
touch u2/baz

svn add u1/baz
svn add u2/baz

svn commit -m'u2 commit of baz' u2/baz

# This should cause an error (and does)
svn commit -m'u1 commit of baz' u1/baz

# Now, try to update u1 (without moving baz).
# Should be an error too
svn update u1

# So move u1/baz to u1/baz.u1 and try the update again
# It should work
mv u1/baz u1/baz.u1
svn update u1

# Now try the commit again... It shouldn't fail, but does!
svn commit -m'u1 commit of baz' u1/baz




