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

Re: Cloning Subversion system information

From: Kevin Grover <kevin_at_kevingrover.net>
Date: 2007-03-22 16:42:34 CET

On 3/22/07, Pavel Shevaev <pacha.shevaev@gmail.com> wrote:
> Hi, folks!
> Sorry, the subject sounds a bit weird but I simply couldn't find a
> better one, let me explain.
> Say I have some skeleton project in the remote repository called Foo.
> Foo has some basic files/directories layout and all svn:externals and
> svn:ignore properties nicely configured.
> What I'd like to achieve is to allow other developers fill their
> working copies attached to other repositories with this skeleton
> project svn entries.
> Something like this:
> svn clone svn://repos/skel/Foo .
> svn ci .
> Or directly onto repository:
> svn clone svn://repos/skel/Foo svn://myrepos/Bar
> One might recommend simply physically copying Foo repository and
> checking the copied repository out. However this is not always
> possible, the remote repository can be simply unavailable physically,
> or the Foo skeleton project can be a part of really huge repository
> and copying it doesn't make sense(why really have 5k+ commit logs
> history in a new clean repository?)
> Probably this is already somehow possible and there are some best
> practices or tools which allow to achieve this. Any tip in this
> direction could be very helpful. Thanks in advance!

NOTE: The following uses Windows syntax for directories. Converting
this sample to Unix should be a no-brainer to anyone who can spell

:: Make an area for SVN Repositories (h:\repos\svn)
cd \
mkdir repos\svn
cd repos\svn

:: Create a template repository (file:///h:/repos/svn/templ)
svnadmin create templ
set r=file:///h:/repos/svn/templ

:: Put something in the template
svn mkdir %r%/trunk %r%/tags %r%/branches -m "Initial Directory Structure"
:: set up any other defaults in templ that you require

:: Look at the template info (note the uuid)
H:\repos\svn>svn info file:///h:/repos/svn/templ
Path: templ
URL: file:///h:/repos/svn/templ
Repository Root: file:///h:/repos/svn/templ
Repository UUID: 550ab216-693f-b94a-ada8-387dd59328ac
Revision: 1
Node Kind: directory
Last Changed Author: kevin.grover
Last Changed Rev: 1
Last Changed Date: 2007-03-22 08:10:47 -0700 (Thu, 22 Mar 2007)

:: Create a dumped version of the template
svnadmin dump templ > templ.dump

:: Make a new copy (with a different UUID)
svnadmin mkdir newrepo
svnadmin load --ignore-uuid newrepo < templ.dump

:: NOTE The above DOES not preserve any hook scripts or config files
:: You could manually save them from the hooks/ and conf/
dirs, or just copy them after the load
:: Or, perhaps there is a way to use svnadmin hotcopy and then
:: restore it and force a new UUID, I'm not sure

H:\repos\svn>svn info file:///h:/repos/svn/newrepo
Path: newrepo
URL: file:///h:/repos/svn/newrepo
Repository Root: file:///h:/repos/svn/newrepo
Repository UUID: a5b1b1d5-b0b8-d24e-8e8c-571c84403d34
Revision: 1
Node Kind: directory
Last Changed Author: kevin.grover
Last Changed Rev: 1
Last Changed Date: 2007-03-22 08:10:47 -0700 (Thu, 22 Mar 2007)

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Mar 22 16:43:28 2007

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.