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

IOError in cvs2svn.py on Win32

From: Francois Beausoleil <fbos_at_users.sourceforge.net>
Date: 2003-07-24 19:38:26 CEST

Hello again !

Well, still working with cvs2svn.py. Here's a new one:
E:\svn-trunk\tools\cvs2svn>cvs2svn.py --trunk-only -s tmp\repos jgb\jgb
----- pass 1 -----
jgb\jgb\build.xml,v
RESYNC: \build.xml,v (1.1) : old time="Thu Apr 04 08:59:58 2002" new
time="Thu A
pr 04 08:59:57 2002"
----- pass 2 -----
RESYNC: \build.xml,v (1.1) : old time="Thu Apr 04 08:59:57 2002" new
time="Thu A
pr 04 08:59:57 2002"
----- pass 3 -----
----- pass 4 -----
committing: Thu Apr 04 08:59:57 2002, over 0 seconds
    adding or changing 1.1 : trunk/build.xml
Traceback (most recent call last):
  File "E:\svn-trunk\tools\cvs2svn\cvs2svn.py", line 2264, in ?
    main()
  File "E:\svn-trunk\tools\cvs2svn\cvs2svn.py", line 2260, in main
    convert(ctx, start_pass=start_pass)
  File "E:\svn-trunk\tools\cvs2svn\cvs2svn.py", line 2139, in convert
    _passes[i](ctx)
  File "E:\svn-trunk\tools\cvs2svn\cvs2svn.py", line 2074, in pass4
    c.commit(dumper, ctx, sym_tracker)
  File "E:\svn-trunk\tools\cvs2svn\cvs2svn.py", line 1852, in commit
    branches)
  File "E:\svn-trunk\tools\cvs2svn\cvs2svn.py", line 1090, in
  add_or_change_path

    pipe.close()
IOError: (0, 'Error')

The test repository contains only a single file. I attached a zip of the
repository to this E-Mail.

What can I do to correct this ? I have a diff of the modifications I
made to
cvs2svn.py to support paths on Win32
(re:
http://article.gmane.org/gmane.comp.version-control.subversion.devel/31384):
Index: cvs2svn.py
===================================================================
--- cvs2svn.py (revision 6562)
+++ cvs2svn.py (working copy)
@@ -77,6 +77,12 @@
 # official restrictions anyway).
 symbolic_name_re = re.compile('^[a-zA-Z][^/\\\\]*$')

+# A regular expression to split a path that contains both forward and
back
+# slashes. This is important on Win32 because the paths will use the
+# platform default, but SVN must receive forward slashes. See the
+# make_path() return value for more information on usage.
+slash_split_re = re.compile("/\\\\|\\\\")
+
 class CollectData(rcsparse.Sink):
   def __init__(self, cvsroot, log_fname_base):
     self.cvsroot = cvsroot
@@ -306,20 +312,22 @@

   if branch_name:
     if path:
- return ctx.branches_base + '/' + branch_name + '/' + path
+ target_path = ctx.branches_base + '/' + branch_name + '/' + path
     else:
- return ctx.branches_base + '/' + branch_name
+ target_path = ctx.branches_base + '/' + branch_name
   elif tag_name:
     if path:
- return ctx.tags_base + '/' + tag_name + '/' + path
+ target_path = ctx.tags_base + '/' + tag_name + '/' + path
     else:
- return ctx.tags_base + '/' + tag_name
+ target_path = ctx.tags_base + '/' + tag_name
   else:
     if path:
- return ctx.trunk_base + '/' + path
+ target_path = ctx.trunk_base + '/' + path
     else:
- return ctx.trunk_base
+ target_path = ctx.trunk_base

+ # Convert from back-slashes to forward-slashes
+ return string.join(slash_split_re.split(target_path), "/")

 def relative_name(cvsroot, fname):
   l = len(cvsroot)

I am not ready to commit, as I would like to write a test for this.

Anyway, I tried with and without the above, and cvs2svn.py still stops
with
the same traceback.

Hope that helps !

Thanks !
François
Developer of Java Gui Builder
http://jgb.sourceforge.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Thu Jul 24 19:39:24 2003

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.