[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-22 16:12:29 CEST

On Mon, Jul 22, 2002 at 01:37:05PM +0200, Swen Thuemmler wrote:

> Swen Thuemmler <swen@mediaways.net> writes:
> > 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.
> No, i don't think that's what you want. cvs2svn needs to support
> tags and branches, and then you wouldn't want all those showing up
> under a directory called /head or /trunk.

Hmmm, ok, point taken. But how will branches get handled then? When cvs2svn just
creates a subdirectory under the main directory, things could get messy
(you might then end up with something like

I'm not sure what will get checked out, when I just check out repos (I do not
want the branches and tags directories get checked out, too). I am not familiar
with branches and tags in subversion.

> > 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.
> Er, huh? Are you sure? When i used it, i did not create the
> base_dir first; my patched cvs2svn took care of it. I also tested
> the -c option, and base_dir was created without trouble.

Hmm. I just checked this again (with subversion 2576), and it fails
for me. I used the original cvs2svn.py and applied your patch. This is
what I get:

$ rm -rf /var/tmp/svn
$ ./cvs2svn.py -c -v -b /head -s /var/tmp/svn/ /var/tmp/cvs/svntest
----- pass 1 -----
processed 3 files
----- pass 2 -----
----- pass 3 -----
----- pass 4 -----
committing: Sat Jul 20 15:50:57 2002, over 267 seconds
    changing 1.1 : /foo
Traceback (most recent call last):
  File "./cvs2svn.py", line 689, in ?
  File "./cvs2svn.py", line 686, in main
    util.run_app(convert, ctx, start_pass=start_pass)
  File "/usr/lib/python2.2/site-packages/svn/util.py", line 33, in run_app
    return apply(func, (pool,) + args, kw)
  File "./cvs2svn.py", line 629, in convert
  File "./cvs2svn.py", line 603, in pass4
    c.commit(t_fs, ctx)
  File "./cvs2svn.py", line 364, in commit
    fs.make_file(root, svn_path, f_pool)
RuntimeError: file not found: transaction `1', path `/head/foo'

With my patch, it does work.

Greetings, Swen

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 22 16:40:53 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.