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

Re: Can I have the same folder in twice?

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-11-02 18:24:20 CET

On Nov 2, 2005, at 14:40, Gabriel Rossetti wrote:

> Yes, I understand better now. I have tried to do just that twice
> actually, remove the repositories,
> but I get strange msgs that made me think that there was a central
> db somewhere.
>
>
> here's what I did on the server side (as root)
>
> mkdir /data/svnroot
> mkdir /data/svnroot/repA
> mkdir /data/svnroot/repB
> mkdir /data/svnroot/private
>
> svnadmin create /data/svnroot/repA
> svnadmin create /data/svnroot/repB
> svnadmin create /data/svnroot/private
>
> (then changed rights, groups, users, etc)

You don't need to mkdir /data/svnroot/repA; svnadmin create /data/
svnroot/repA will do that for you.

> on the client side (with gui client):
>
> svn add dirA
> svn commit -m "foo....." my_url/data/svnroot/repA
>
> svn add my_dirs
> svn commit -m "foo....." my_url/data/svnroot/private
>
> but at this point, since private contains dirA, I got an error msg
> that repA was already in the repository.
> RepA is where my teammates and I accutally put our code and private
> is a private backup of all my files,
> so it also has repA in it.

You're not going to be able to put all of your private files in a
repository, if some of those private files are already Subversion
working copies. The process of putting the files into the repository
would add .svn directories everywhere, but your working copies
already have .svn directories. So this can't work.

As Joshua said, svn commit does not take a URL argument. It already
knows the repository URL from your checkout command. So a better
example would be (assuming now that private does not contain any
existing working copies):

svn checkout $my_url/data/svnroot/repA
cd repA
# create dirA somehow
svn add dirA
svn commit -m "adding dirA to repA"

cd ..

svn checkout $my_url/data/svnroot/private
cd private
# create my_dirs somehow
svn add my_dirs
svn commit -m "adding my_dirs to private"

It would be a good idea for you to step away from the GUI client for
awhile and learn how the commands work on the command-line. I don't
think you need to look into SVK at this time as Joshua suggests; I
think that would merely be very confusing at this point. Understand
first how Subversion works. Then, if it proves insufficient, maybe
look into what SVK can do.

> I then decided to start over with my setup, so on the server, I did :
>
> rm -fr /data/svnroot
>
> mkdir /data/svnroot
> mkdir /data/svnroot/repA
> mkdir /data/svnroot/repB
> mkdir /data/svnroot/private
>
> svnadmin create /data/svnroot/repA
> svnadmin create /data/svnroot/repB
> svnadmin create /data/svnroot/private
>
> (then changed rights, groups, users, etc)
>
> on the client side (with gui client):
>
> svn add dirA
> svn commit -m "foo....." my_url/data/svnroot/repA
>
> now I get the same error as before, but this time it sais that I
> can't add dirA
> because it exists already on /data/svnroot/private/.../dirA , but I
> deleted it.... So.... I tried something else:
>
> rm -fr /data/svnroot
>
> mkdir /data/svnroot
> mkdir /data/svnroot/public
> mkdir /data/svnroot/private
>
> svnadmin create /data/svnroot/public
> svnadmin create /data/svnroot/private
>
> (then changed rights, groups, users, etc)
>
> on the client side (with gui client):
>
> svn add directory_that_held_all_of_repA_directories
> svn commit -m "foo....." my_url/data/svnroot/public/
>
> and I get the same error as before, I can't add dirA (that is in
> directory_that_held_all_of_repA_directories)
> because it exists already on /data/svnroot/private/.../dirA
>
> What I didn't get (and I still don't completely get now) is how can
> those last two errors existe after I deleted
> everything? I hope that this explanation of my (wrong)doing helps.

directory_that_held_all_of_repA_directories must therefore be a
working copy of your old now-deleted repository. You can confirm that
this is the case by looking into the directory and noticing that it
contains .svn directories. The .svn directories link the working copy
with a particular repository. If you now want to import this into a
different repository, you'll have to get rid of the .svn directories.
You can do it manually or by using svn export.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 2 18:27:35 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.