Justin Mitchell justin at discordia.org.uk
Wed Sep 15 08:43:49 UTC 2010

On Tue, 2010-09-14 at 23:52 +0100, Jon Reynolds wrote:
> Hello all,
> I am having some trouble setting up subversion properly it seems and am
> looking for some advise.
> I have been using subversion with some basic success for a while now. I
> can create repositories and use them to control a bunch of files.
> For example, I create a repo: svnadmin create /home/me/svn/repos/myrepo
> I then check it out: svn co file:///home/me/svn/repos/myrepo
> Then in my working copy of myrepo, I can add files and dirs and svn add
> them then svn commit them no problem.
> The problem I have come up against now is the use of trunk and branches
> and tags. 
> I understand (I think) the concept of trunk being the working copy and
> whenever nevcessary, adding a copy of trunk into tags as a 'snapshot'.
> So svn copy trunk tags/v1 for example.
> But I am not sure if I am setting it all up right. If I just create
> these dirs in myrepo: svn mkdir trunk branches tags, then commit them I
> believe I should be able to then just check out the trunk, or tags/v1
> but I cannot.
> If I try svn co file:///home/me/svn/repos/myrepo <tab><tab> I just get
> the svn auto-generated stuff showing up, no sign of trunk or tags etc.
> How do I get to checkout just trunk or tags/v1?
> At the moment, all I can do is check out myrepo which brings everything
> within: trunk, branches and tags, which is no good if you had lots of
> branches and tags when all you want to do is work on trunk.

trunk, tags and branches are just directories, they have no special
meaning, name them what you like.

the only thing 'special' is that when you 'svn copy' one directory into
another, it retains a relation and history to the original. 

so to create a branch, you are just making a copy of a directory at a
specific point in time, you can then change them independantly, but svn
is aware that they originated from the same place, so you can do
comparative diffs and stuff.

and for creating the directories.

first checkout your empty repo,
then cd into it and:
mkdir Trunk Branches Tags
svn add Trunk Branches Tags
svn commit

you can then if you really want just checkout .../myrepo/Trunk
to get only the trunk directory.

More information about the Swlug mailing list