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

Re: [PATCH] cvs2svn into subdirectory of existing repository

From: Swen Thuemmler <swen_at_mediaways.net>
Date: 2002-07-20 17:32:03 CEST

On Sat, Jul 20, 2002 at 04:25:19PM +0200, Swen Thuemmler wrote:

> I have added two new options to cvs2svn:
>
> -c create the repo before acting on it.
> -b base directory in svn repo where files are added.

Three cheers to this (I was thinking about something like that, too, to be
able to create the svn files in /head or /trunk). Thanks.

There seems to be one problem with your patch: when you specify a base
directory and the repository is not yet created or it is created but the
base directory does not yet exist, it will fail. The patch below will fix this.

Greetings, Swen

--- cvs2svn.py.orig Sat Jul 20 17:29:53 2002
+++ cvs2svn.py Sat Jul 20 17:30:37 2002
@@ -337,6 +337,9 @@
     # create a pool for each file; it will be cleared on each iteration
     f_pool = util.svn_pool_create(c_pool)
 
+ if fs.check_path(root, ctx.base_dir, f_pool) == svn_node_none:
+ fs.make_dir(root, ctx.base_dir, f_pool)
+
     for f, r in self.changes:
       # compute a repository path. ensure we have a leading "/" and drop
       # the ,v from the file name

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jul 21 10:56:52 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.