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

[PATCH] [cvs2svn] Bug in relative_name

From: Max Bowsher <maxb_at_ukf.net>
Date: 2003-08-21 00:14:26 CEST

Currently, if the filename passed to relative_name does not begin with the
cvsroot, relative_name returns a number, not a string. This patch makes this
error an actual error.

Max.

* tools/cvs2svn/cvs2svn.py (relative_name): If fname is not a subpath of
  cvsroot, then actually error, instead of returning garbage.

Index: cvs2svn.py
===================================================================
--- cvs2svn.py (revision 6768)
+++ cvs2svn.py (working copy)
@@ -326,7 +326,9 @@
     if fname[l] == '/':
       return fname[l+1:]
     return fname[l:]
- return l
+ sys.stderr.write('relative_path("%s", "%s"): fname is not a sub-path of'
+ ' cvsroot\n' % (cvsroot, fname))
+ sys.exit(1)

 def visit_file(arg, dirname, files):

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 21 00:15:29 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.