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

[PATCH] cvs2svn.py - return sensible path from make_path

From: Francois Beausoleil <fbos_at_users.sourceforge.net>
Date: 2003-10-14 21:44:23 CEST

Hello again !

Another patch to correct a problem in cvs2svn.

Bye,
François

PS: Patch also attached.

Log Message:
* tools/cvs2svn/cvs2svn.py
  (make_path):
    Correct a bug where the returned path name could contain double
    slashes or a combination of backslash and slashes. This was
    most evident on Win32 where the returned path name would contain
    'trunk/\path'.

Index: tools/cvs2svn/cvs2svn.py
===================================================================
--- tools/cvs2svn/cvs2svn.py (revision 7422)
+++ tools/cvs2svn/cvs2svn.py (working copy)
@@ -296,21 +296,21 @@

   if branch_name:
     if path:
- return ctx.branches_base + '/' + branch_name + '/' + path
+ tempname = ctx.branches_base + '/' + branch_name + '/' + path
     else:
- return ctx.branches_base + '/' + branch_name
+ tempname = ctx.branches_base + '/' + branch_name
   elif tag_name:
     if path:
- return ctx.tags_base + '/' + tag_name + '/' + path
+ tempname = ctx.tags_base + '/' + tag_name + '/' + path
     else:
- return ctx.tags_base + '/' + tag_name
+ tempname = ctx.tags_base + '/' + tag_name
   else:
     if path:
- return ctx.trunk_base + '/' + path
+ tempname = ctx.trunk_base + '/' + path
     else:
- return ctx.trunk_base
+ tempname = ctx.trunk_base
+ return string.replace(string.replace(tempname, '/\\', '\\'), '//',
'/')

-
 def relative_name(cvsroot, fname):
   l = len(cvsroot)
   if fname[:l] == cvsroot:

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

Received on Tue Oct 14 21:47:19 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.