You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Steve Cohen <sc...@javactivity.org> on 2005/01/29 14:48:07 UTC

Dumb newbie question

Okay, here's my situation and "requirements".  I'm really just playing 
with subversion at this point in time to gain familiarity with the tool.

I've installed subversion on my RedHat 9.0, setting it up to use the 
Apache server.  I know little about Apache.  I don't really intend at 
this point to open my repository to the world, I will be the only user 
for the forseeable future and I want to access my repository as localhost.

Installing subversion on 9.0 was really a struggle.  The RPM 
instructions are not quite right, and I wound up disabling my apache 
server until I got it right.  But apache now starts and runs. 

Following the documented directions I added the following to httpd.conf

LoadModule dav_svn_module modules/mod_dav_svn.so

...

<Location /svn>
  DAV svn
  SVNParentPath /usr/local/svn
</Location>
no authentication yet, let's get it working first.

I created a repository using
$ svnadmin create /usr/local/svn/myproj

I created an initial layout as documented:

$ cd ~/tmp
$ ls -lR
.:
total 4
drwxrwxr-x    5 scohen   scohen       4096 Jan 25 21:41 myproj

./myproj:
total 12
drwxrwxr-x    2 scohen   scohen       4096 Jan 25 21:41 branches
drwxrwxr-x    2 scohen   scohen       4096 Jan 25 21:41 tags
drwxrwxr-x    2 scohen   scohen       4096 Jan 25 21:41 trunk

./myproj/branches:
total 0

./myproj/tags:
total 0

./myproj/trunk:
total 0

and then add it to svn:
$ svn import myproj file:///usr/local/svn/myproj
Adding         myproj/trunk
Adding         myproj/branches
Adding         myproj/tags

Now I browse to http://localhost/svn/myproj and get the error message 
"Could not open the requested SVN filesystem".  I get a similar error 
message when trying to link to the repsitory from the SVN eclipse plugin.

So, what have I done wrong?  I know it's something dumb.  I google this 
error message and find various statements saying the the uid:gid MUST be 
apache:apache but I don't have either an apache user or group on my 
system.  (RedHat does not set it up that way).  root seems to own all 
the apache files themselves.  Specifically, what files must be set this 
way?  Just the subversion repository or what?




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Dumb newbie question

Posted by "Martin A. Brooks" <ma...@hinterlands.org>.
Steve Cohen wrote:

> # svn import myproj http://localhost/svn/myproj -m 'Initial Load'


svn did exactly what you asked it to.  It imported the contents of
"myproj"  into the root of the repository, not into a subfolder such as
"trunk" or "branch".

> In other words the source code appears in branches that are peers of
> 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.


The "trunk" is the main thrust of your development. Import your files
into http://localhost/svn/myproj/trunk or, better still now they're in
the repo anyway, use svn to move them around your repository.

Mart.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Dumb newbie question

Posted by Steve Cohen <sc...@javactivity.org>.
On to the next dumb newbie question:

Does subeclipse work even minimally?

I was able to check out a project from my new repository using it, but I 
was not able to synch with the repository, bringing up this error message:


An internal error occurred during: "Synchronizing SVN (/myproj)".
java.lang.NullPointerException
org.tigris.subversion.subclipse.core.sync.SVNWorkspaceSubscriber.findChanges(SVNWorkspaceSubscriber.java:251)
org.tigris.subversion.subclipse.core.sync.SVNWorkspaceSubscriber.refresh(SVNWorkspaceSubscriber.java:220)
org.tigris.subversion.subclipse.core.sync.SVNWorkspaceSubscriber.refresh(SVNWorkspaceSubscriber.java:201)
org.eclipse.team.internal.ui.synchronize.RefreshSubscriberJob.run(RefreshSubscriberJob.java:290)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

Can someone tell me what this is about, or should I just give up on 
subeclipse for now?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Dumb newbie question

Posted by Steve Cohen <sc...@javactivity.org>.
Christopher Ness wrote:
> 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

Thanks again Chris (and also Martin).  Seems there are a couple of 
differences here from CVS.  At first I thought these explicitly created 
trunk and branches directory was cumbersome, but after reading through 
the branch chapter, the logic becomes clear.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Dumb newbie question

Posted by Christopher Ness <ch...@nesser.org>.
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

Re: Dumb newbie question

Posted by Steve Cohen <sc...@javactivity.org>.
Christopher Ness wrote:
> On Sat, 2005-29-01 at 08:48 -0600, Steve Cohen wrote:
>  8-< 
> 
>>Now I browse to http://localhost/svn/myproj and get the error message 
>>"Could not open the requested SVN filesystem".  I get a similar error 
>>message when trying to link to the repsitory from the SVN eclipse plugin.
>>
>>So, what have I done wrong?  I know it's something dumb.  I google this 
>>error message and find various statements saying the the uid:gid MUST be 
>>apache:apache but I don't have either an apache user or group on my 
>>system.  (RedHat does not set it up that way).  root seems to own all 
>>the apache files themselves.  Specifically, what files must be set this 
>>way?  Just the subversion repository or what?
> 
> 
> What user does apache run as on your system?  You can find this in the
> config file or use the `ps` command to find out.  That is what you need
> to set the file permissions as in your repository
>     /usr/local/svn/myproj
> 
> 
> If this still fails to read the file system, you likely have a different
> version of BDB compiled into or linked against apache than subversion.
> 
> So when apache uses it's BDB access programs to open up the repository
> it fails since they are not the same version.
> 
> RPM's on older systems with loose dependencies are painful.  I ended up
> building everything from source for my FC1 box (at the time painful, but
> now I have a better understanding of how things work).
> 
> Cheers,
> Chris
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.

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.

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
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?

Thanks

Steve Cohen


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Dumb newbie question

Posted by Christopher Ness <ch...@nesser.org>.
On Sat, 2005-29-01 at 08:48 -0600, Steve Cohen wrote:
 8-< 
> Now I browse to http://localhost/svn/myproj and get the error message 
> "Could not open the requested SVN filesystem".  I get a similar error 
> message when trying to link to the repsitory from the SVN eclipse plugin.
> 
> So, what have I done wrong?  I know it's something dumb.  I google this 
> error message and find various statements saying the the uid:gid MUST be 
> apache:apache but I don't have either an apache user or group on my 
> system.  (RedHat does not set it up that way).  root seems to own all 
> the apache files themselves.  Specifically, what files must be set this 
> way?  Just the subversion repository or what?

What user does apache run as on your system?  You can find this in the
config file or use the `ps` command to find out.  That is what you need
to set the file permissions as in your repository
    /usr/local/svn/myproj


If this still fails to read the file system, you likely have a different
version of BDB compiled into or linked against apache than subversion.

So when apache uses it's BDB access programs to open up the repository
it fails since they are not the same version.

RPM's on older systems with loose dependencies are painful.  I ended up
building everything from source for my FC1 box (at the time painful, but
now I have a better understanding of how things work).

Cheers,
Chris
-- 
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
09:58:14 up 19:55, 4 users, load average: 0.55, 0.36, 0.28 
http://www.fsf.org/philosophy/no-word-attachments.html