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

Re: Dumb newbie question

From: Christopher Ness <chris_at_nesser.org>
Date: 2005-01-29 18:42:04 CET

On Sat, 2005-29-01 at 10:55 -0600, Steve Cohen wrote:
> Thanks, that helped. I don't know where I got the idea that I had no
> apache user. I do, and it was just a question of making him owner of
> the repository.

No problem.

> However, we now come to the next hurdle.
>
> In chapter 5 of the SVN book, it recommends importation of an initial
> layout, in which each root project directory has three subdirectories,
> /project/trunk, /project/branches, and /project/tags.

That is one layout. I prefer not to have {trunk,branches,tags}
directories all over the place so I make them at the top level. I find
it confusing if there are a bunch of trunk directories below projects -
but that's a personal preference.

\
trunk\
  proj1\
  proj2\
  ...
branches\
  proj1\
  proj2\
  ...
tags\
  proj1\
  proj2\
  ...

> I do this, and then I import my actual source tree. But there seems to
> be no relation between this and the three "layout folders". That is,
> after the import command
>
> # svn import myproj http://localhost/svn/myproj -m 'Initial Load'
>
> I see this:
>
> Revision 2: /myproj
>
> * ..
> * WebRoot/
> * branches/
> * src/
> * tags/
> * trunk/
>
> In other words the source code appears in branches that are peers of

I think you mean directories, not branches. Check out the definition of
a branch in the book.

> these original "layout" folders, not underneath them. Clicking through
> the src and WebRoot directories does bring up the source code. Is this
> what I should have? If so, then I don't understand the function of the
> branches, tags, and trunk directories. If not, what is the proper
> import command to import the source tree?

If I've decoded that question right, here goes:
Since you are experimenting with svn:

Delete this repository. (You've got all your files elsewhere right?!?)
Create a new one.
Copy the src/ directory to ~/tmp/myproj/trunk/
Copy the WebRoot/ directory to ~/tmp/myproj/trunk/
Now run svn import on ~/tmp/

To get this layout:
     * ..
     * branches/
     * tags/
     * trunk/
       * WebRoot/
       * src/

Explanation (as best as I can):
===============================

I think you really wanted your src/ to be trunk/ since that usually is
the head of the development in most projects that I've been a part of.

I don't know if you wanted WebRoot to be a tag directory or not.
Depends what you want to do with it. ;)

trunk/ = baseline of the code. The latest and greatest that builds.
branches/ = experimental sandboxes for developers so you don't break
            the trunk. You merge changes between trunk and branches.
tags/ = snapshots of code. Usually at a milestone of the project.

The layout is only suggested, a directory is just a directory unless you
attach a specific meaning to it.

For example branches/ is the standard place for someone to attempt to
fix a bug. Once the bug fix stabilizes they merge the change set -
using `svn merge` - from their branch into the main trunk. But you
could make a branch in any directory, even at the root if you'd like and
have permissions to do so.

Keep reading the book, it's nicely explained and look at the subversion
repository to see how they set up their layout for an example.
http://svn.collab.net/viewcvs/svn/

HTH's
Chris

-- 
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
12:19:31 up 22:17, 6 users, load average: 1.07, 0.64, 0.39 
http://www.fsf.org/philosophy/no-word-attachments.html

Received on Sat Jan 29 18:44:10 2005

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.