[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: repository directories layout

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-05-10 08:37:23 CEST

On May 9, 2007, at 22:37, H.S. wrote:

> I have searched google and it is a common suggestion to have trunk,
> branches and tags directories in the repository:
> RepoName
> tags
> trunk
> branches
> Now, what I did was, first created the repo RepoName with svnadmin
> command and then made the three directories using svn mkdir
> commands. I then checkout the repo into my local machine, and then
> copied the source code into trunk directory and then added all the
> files in that directory to the repo. Then I committed the repo
> back. I can then checkout the repo and I get the directory with
> repo name and the three directories (where trunk has the source
> code). Am I doing it right? If yes, then other programmers just
> make their changes in the source files in the trunk directory and
> commit their changes back?

Yes...ish. In fact, from now on, you will want to have a working copy
of only the trunk. You do not need to also have all the branches and
all the tags on your local hard disk; it's generally a waste of
space. When the time comes that you want to work with a branch, then
create it in the repository (using URLs), and then check out just
that branch to a new working copy, or switch your existing trunk
working copy to the branch.

> The other method I understand is to create the three directories in
> a local directory. Put all the source files in trunk directory and
> then create the repository with all the three directories in that.

Well, to clarify, the other method is to create the trunk, branches,
tags directories in a local directory, put the source into the trunk
directory, and "svn import" the top local directory into a repository
that has already been created with "svnadmin create".

> Are both the methods equivalent as far as the directory structure
> is concerned?

Um, sure. You can use whichever method you prefer. Of course you'll
only need to do this once to set up a given project.

> If you can give some other pointers regarding creating the new
> repositories (I checked the red book, it talks about the directory
> structure but doesn't give an example showing exactly what to
> commit while creating the repo), that would be an added bonus.

What else would you like to know? I think you've pretty much covered
it here.

Well, except what someone wrote about how you should decide whether
you multiple repositories for multiple projects, or all projects in a
single repository, or some mixture.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 10 08:37:53 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.