You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Eric Smith <er...@brouhaha.com> on 2003/08/02 01:27:02 UTC

new user question about import/checkout/trunk

I just started using subversion, had some minor problems getting it built
and installed, and I think it's working now.  But I'm confused about some
details of svn import, export, and the trunk.  I'll describe that at the
end of the message, but first I'll explain what I've done so far.  My
appologies if this is too wordy.

I just set up Subversion on a server and a client machine both running
Red Hat 9.  I didn't want to upgrade the stock Apache 2.0.40, mainly due to
the huge cascade of other stuff I'd also have to upgrade.  So on the client
machine, which does not have Apache installed, I unpacked the tarball of
0.26.0, configured it with --enable-all-static, and built it. The links
failed due to the lack of "-lpthread" in the link options, so I manually
added that to the LIBS variable in the Makefile.  (I saw that some people
have claimed that doing a second configure fixes this, but it didn't for
me.)

I tried to do an "svnadmin create" using the resulting binary, and got
errors from db4 (Red Hat db4-4.0.14-20) about an unimplemented function.
I thought 4.0.14 was supported?  I downloaded db-4.1.25.tar.gz and
patch.4.1.25.1 from Sleepycat, unpacked it in the subversion directory and
patched it, did a make clean, a fresh configure, and built it again.  This
time I was able to do an "svnadmin create" successfully.

I copied the svn, svnadmin, svndumpfilter, svnlook, svnserve, and
svnversion binaries to /usr/local/bin on the server, created a user for
subversion, and set up xinetd and sshd appropriately.  I created a
/home/svn directory as a parent for my repositories, and within that
directory did an "svnadmin create tsbutils" to set up a repository for
my tsbutils project.

On the client, from the directory above my tsbutils source directory,
I tried to import my code based on an example in the book:
  svn import svn+ssh://svn.example.com/tsbutils/ tsbutils
This resulted in an error.  Apparently the book is incorrect, or
the syntax has changed since it was written, and the URL comes after
the local path rather than before.  I tried:
  svn import tsbutils svn+ssh://svn.example.com/tsbutils/
and it seemed to work OK.

Next I wanted to check out the code from Subversion into a new
directory.  Based on the examples in the book, I tried:
  svn checkout svn+ssh://svn.example.com/tsbutils/trunk tsbutils
but this gave the error:
  svn: Bad URL passed to RA layer
  svn: Source URL doesn't exist: svn+ssh://svn.brouhaha.com/tsbutils/trunk.

After some experimentation, I found that:
  svn checkout svn+ssh://svn.example.com/tsbutils tsbutils
did in fact check out my sources as expected.

So my question is, why didn't it work with /trunk at the end?  Was
I supposed to do something to manually create trunk?  Or was I supposed
to import to .../tsbutils/trunk/?

Thanks,
Eric Smith


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

Re: new user question about import/checkout/trunk

Posted by Philip Martin <ph...@codematters.co.uk>.
Jack Repenning <jr...@collab.net> writes:

>>"Parent-into-child" copies should work provided they are not WC-to-WC.
>
> Huh.  With what semantics?  I guess "... as of the revision in effect
> at the moment you initiate the copy"--i.e., the copy does not contain
> itself (recursing forever....)

Yes, it's the versioning that makes it possible to do a
parent-into-child copy.  Once I realised that the Subversion
filesystem supported this sort of copy there seemed little reason for
the client layer to disallow it.

-- 
Philip Martin

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

Re: new user question about import/checkout/trunk

Posted by Jack Repenning <jr...@collab.net>.
At 9:54 PM +0100 8/4/03, Philip Martin wrote:
>Hmm, are you using an old version of Subversion?

Oh.  Yeah: that came from 0.23.0.

>I seem to remember
>changing that a few weeks ago?  "Parent-into-child" copies should work
>provided they are not WC-to-WC.

Huh.  With what semantics?  I guess "... as of the revision in effect 
at the moment you initiate the copy"--i.e., the copy does not contain 
itself (recursing forever....)
-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090

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

Re: new user question about import/checkout/trunk

Posted by Philip Martin <ph...@codematters.co.uk>.
Jack Repenning <jr...@collab.net> writes:

> At 11:50 AM -0700 8/4/03, Eric Smith wrote:
>>   svn copy svn+ssh://svn.example.com/ svn+ssh://svn.example.com/branch/foo
>
> That produces an error:
> subversion/libsvn_client/copy.c:999: (apr_err=200007)
> svn: Trying to use an unsupported feature
> svn: cannot copy path
> 'svn+jack://macboy.repenning.homeip.net/svn/jrepenning' into its own
> child 'svn+jack://macboy.repenning.homeip.net/svn/jrepenning/tags/foo'

Hmm, are you using an old version of Subversion?  I seem to remember
changing that a few weeks ago?  "Parent-into-child" copies should work
provided they are not WC-to-WC.

-- 
Philip Martin

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

Re: new user question about import/checkout/trunk

Posted by Jack Repenning <jr...@collab.net>.
At 11:50 AM -0700 8/4/03, Eric Smith wrote:
>If I *didn't* put my stuff one level down, and then I wanted to create
>a branch by copying, would it cause a problem?  In other words, if
>I did this:
>   svn copy svn+ssh://svn.example.com/ svn+ssh://svn.example.com/branch/foo

That produces an error:
subversion/libsvn_client/copy.c:999: (apr_err=200007)
svn: Trying to use an unsupported feature
svn: cannot copy path 
'svn+jack://macboy.repenning.homeip.net/svn/jrepenning' into its own 
child 'svn+jack://macboy.repenning.homeip.net/svn/jrepenning/tags/foo'

You can achieve what you probably meant with a bunch of stuff like

svn copy svn://host/file1          svn://host/tags/foo/file1
svn copy svn://host/file2	svn://host/tags/foo/file2
...

-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090

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

Re: new user question about import/checkout/trunk

Posted by cm...@collab.net.
"Eric Smith" <er...@brouhaha.com> writes:

> > So, our recommendation would have been for you to instead
> > import like so:
> >
> >    svn import tsbutils svn+ssh://svn.example.com/tsbutils/trunk
> 
> Another message explained that (though without the example command).
> I deleted and recreated my repository and did that, and it works great.
> 
> If I *didn't* put my stuff one level down, and then I wanted to create
> a branch by copying, would it cause a problem?  In other words, if
> I did this:
>   svn copy svn+ssh://svn.example.com/ svn+ssh://svn.example.com/branch/foo
> 
> Even if that doesn't cause a problem, then if I later want to create a
> second branch:
>   svn copy svn+ssh://svn.example.com/ svn+ssh://svn.example.com/branch/bar
> 
> Won't that second branch also include a branch of the first branch
> (branch/foo)?

Yep, you seem to have a firm grasp on the "branch by copy" concept.

> If so, it seems like it would be a *very* good idea for the book and
> man page to stronly discourage imports (and checkins) at the top
> level.

Hm... yeah, that does seem like a strong point to make.  Besides --
the last thing you want is to come back from a week at the beach, run
'svn update' on your "trunk" working copy and, because all the
branches are subdirs of that directory, get full checkouts of all the
branches that your co-workers made while you were on vacation. :-)

> Also, it would be nice if the book would explain the "-t" option to
> svnserve.

Noted.

> I'd be willing to work on the proposed doc changes if you like, though
> since I'm a Subversion novice I'd want someone to check my work before
> committing it.

Sure, go for it.

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

Re: new user question about import/checkout/trunk

Posted by Eric Smith <er...@brouhaha.com>.
> So, our recommendation would have been for you to instead
> import like so:
>
>    svn import tsbutils svn+ssh://svn.example.com/tsbutils/trunk

Another message explained that (though without the example command).
I deleted and recreated my repository and did that, and it works great.

If I *didn't* put my stuff one level down, and then I wanted to create
a branch by copying, would it cause a problem?  In other words, if
I did this:
  svn copy svn+ssh://svn.example.com/ svn+ssh://svn.example.com/branch/foo

Even if that doesn't cause a problem, then if I later want to create a
second branch:
  svn copy svn+ssh://svn.example.com/ svn+ssh://svn.example.com/branch/bar

Won't that second branch also include a branch of the first branch
(branch/foo)?  If so, it seems like it would be a *very* good idea for the
book and man page to stronly discourage imports (and checkins) at the top
level.

Also, it would be nice if the book would explain the "-t" option to
svnserve.

I'd be willing to work on the proposed doc changes if you like, though
since I'm a Subversion novice I'd want someone to check my work before
committing it.

Thanks!
Eric


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

Re: new user question about import/checkout/trunk

Posted by cm...@collab.net.
"Eric Smith" <er...@brouhaha.com> writes:

> On the client, from the directory above my tsbutils source directory,
> I tried to import my code based on an example in the book:
>   svn import svn+ssh://svn.example.com/tsbutils/ tsbutils
> This resulted in an error.  Apparently the book is incorrect, or
> the syntax has changed since it was written, and the URL comes after
> the local path rather than before.  I tried:
>   svn import tsbutils svn+ssh://svn.example.com/tsbutils/
> and it seemed to work OK.

The book is out of date.  (Sorry 'bout that).  The syntax has indeed
changed its ordering.

> Next I wanted to check out the code from Subversion into a new
> directory.  Based on the examples in the book, I tried:
>   svn checkout svn+ssh://svn.example.com/tsbutils/trunk tsbutils
> but this gave the error:
>   svn: Bad URL passed to RA layer
>   svn: Source URL doesn't exist: svn+ssh://svn.brouhaha.com/tsbutils/trunk.

"trunk" is a convention that we the book authors (and the Subversion
developers, I think) are recommending.  It's not a magic path
component that means "get me the main branch" -- it's a *literal* path
component.  So, our recommendation would have been for you to instead
import like so:

   svn import tsbutils svn+ssh://svn.example.com/tsbutils/trunk

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