I successfully set up SVN and XCode, it’s really cool !
I commit, update, I even tag (in the Terminal though…) ! All this is pretty easy
Now I’d like to work with different branches, but I’m a bit confused.
I’v followed this tutorial, and it has a section about branching. What it says is to use this script :
#!/bin/ksh
# A script to branch a SVN trunk
reporoot=/Library/Subversion/Repository/
projdir=Projects
# Prompt for repository name
print -n "Enter repository name:"
read repo
# Prompt for project name
print -n "Enter project name:"
read project
# Prompt for branch name
print -n "Enter branch name:"
read branch
# Create branch
svn copy file://$reporoot/$repo/$projdir/$project/trunk file://$reporoot/$repo/$projdir/$project/branches/$branch -m "Creating a branch of the ‘$project‘ project."
echo
echo Creation of a branch of the $project project complete!
echo
But what I see is it’s just a shell script that copies the current trunk to a branch (like a tag). And so if I do this, I will still be committing in the trunk no ?
Do you have any idea of a way to be able to “switch” easily between branches, for updates and commit ?
Thank you very much.
subversion doesn’t have a branch system. This is why you usually see a folder with “trunk”, “tags” and “branches” in it. If you want to be able to switch between branches and the trunk effectively, you would probably have to create a symlink to the branch you are using. If you later wish to switch branches, you simply re-create this symlink.
I am not sure whether Xcode likes this though, or not.