If the other person really is sitting next to you, might I suggest pair programming? They can come over to your computer and you can work together on it. It can be very effective and when you're having trouble, you don't have to work in isolation.
That being said, even with pair programming sometimes you've got to send code to someone else that isn't ready for trunk. Other than the typing involved, there's not much to creating a short-lived branch in subversion, and some small scripts will automate a lot of the process for you.
Here are two scripts that work for me. They assume a repository structure like:
project/trunk/
/branches/some_branch
/another_branch
Some adjustments would be required to work with another structure.
# script 1: svn_wc2b (working copy to branch)
trunk_url=`svn info | grep URL | sed 's/URL: //'`
project_base=`svn info | grep URL | sed 's/URL: //;s/\/trunk.*//'`
branch_name=my_working_copy
svn cp $trunk_url $project_base/branches/$branch_name -m "Creating temporary branch for working copy."
svn switch $project_base/branches/$branch_name
Then when you want to share your working copy of trunk, you would type:
svn_wc2b # creates branch, switches to it
svn commit # commit your in-progress work to the branch
To get your code, the other developer just needs to type:
svn switch http://repository/project/branches/my_working_copy
When the other developer is done and has committed changes, use a script like this:
# script 2: svn_b2wc (branch to working copy)
branch_revision=`svn log -q --stop-on-copy | grep '^r[0-9]' | sed 's/^r//;s/ |.*//' | tail -n 1`
if [ -e $branch_revision ] && [ -e $1 ]
then
echo "Couldn't get branch creation revision number. Check svn log --stop-on-copy and use svn_b2wc <revision_number>"
exit
elif [ -e $branch_revision ]
then
branch_revision=$1
fi
branch_url=`svn info | grep URL | sed 's/URL: //'`
project_base=`svn info | grep URL | sed 's/URL: //;s/\/branches.*//'`
branch_name=my_working_copy
svn switch $project_base/trunk
svn merge -r $branch_revision:HEAD $branch_url .
svn delete $branch_url -m "Deleting working copy branch."
From your directory that has been switched into your branch, you type:
svn_b2wc # switch back to trunk, merge branch changes, delete branch
The code changed in the branch is now back in your working copy of trunk and you can continue working until you are ready to commit. It may seem like a lot just to share some code, but if you spend some time automating your processes with scripts then it will only take seconds each time you need to use it.