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

Re: project vs. repository

From: Alan Taylor <ataylor_at_ieee.org>
Date: Thu, 20 Jan 2011 07:21:02 +0800

On Fri, Jan 14, 2011 at 11:37, Edward Ned Harvey <svn_at_nedharvey.com> wrote:
>> From: alan.james.taylor_at_gmail.com [mailto:alan.james.taylor_at_gmail.com]
>> On Behalf Of Alan Taylor
>>
>> My problem is that cfg should be a project within the repo
>> and now I want to add another project, i.e.
>> /srv/svn/cfg
>> /srv/svn/pxe
>>
>> What is the best way to move things around ?
>
> This was already said by David, but it was rather buried deep in there...
> So just to make sure it didn't sneak past you...
>
> Read the man pages for each of these, cuz I'm leaving out some details.  But
> these are the main ingredients.
> mkdir foo
> svnadmin create foo
> svnadmin dump /srv/svn/cfg | svnadmin load foo --parent-dir cfg
> mv /srv/svn /srv/svn_old
> mv foo /srv/svn
>
>
Thank you to everyone for taking the time to reply. It was very
helpful and the move seems to have gone fairly well. For anyone
considering the same thing, here's what happened:

I originally created the repository with
svnadmin create /srv/svn/cfg
(mistake !)

I use the svnserve server with sasl authentication.

I want to move the repository root to /srv/svn/ and have that contain
several projects:
/srv/svn/cfg (current)
/srv/svn/pxe (new)

on the svn server:
svnadmin dump /srv/svn/cfg > cfg_orig
copy cfg_orig and /srv/svn/cfg/conf/svnserve.conf to somewhere safe
as a precaution I also backed up the /srv/svn/cfg directory with the
os normal filesystem tools.
deleted /srv/svn/ and everything below it

svnadmin create /srv/svn
svn mkdir file:///srv/svn/cfg
svn mkdir file:///srv/svn/cfg/trunk
svn mkdir file:///srv/svn/cfg/branches
svn mkdir file:///srv/svn/cfg/tags
svnadmin load /srv/svn/ --parent-dir cfg < tmp/cfg_orig
chown -cR svn:svn /srv/svn/*
chmod g+w /srv/svn/db/rep-cache.db
(not sure about the last, supposed bug in svn 1.6 ?)
service svnserve restart

on my normal client workstation (titan is the svn server):
$svn mkdir svn://titan/pxe
$svn mkdir svn://titan/pxe/trunk
$svn mkdir svn://titan/pxe/branches
$svn mkdir svn://titan/pxe/tags
$svn import /some_directory/pxe_files svn://titan/pxe/trunk -m
"Initial import from cfg"

$ svn checkout svn://titan/cfg/trunk cfg/
$ svn checkout svn://titan/pxe/trunk pxe/

Seems to be working fine. Initially created the pxe hierarchy with the
'svn mkdir file:///' commands, but that resulted in an authentication
failure when I tried to connect using svnserve from the client. I
deleted the directories and re-created them from the client using 'svn
mkdir svn://' as above - that seemed to solve the problem. I'm not
sure why the 'cfg' hierarchy should have been different ?

Anyway, all seems to be working fine. Many thanks to you all for the
very helpful replies.

BRgds/Alan
Received on 2011-01-20 00:21:40 CET

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.