You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Max Bowsher <ma...@ukf.net> on 2003/08/20 22:14:26 UTC

[PATCH] [cvs2svn] Bug in relative_name

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

Re: [PATCH] [cvs2svn] Bug in relative_name

Posted by kf...@collab.net.
"Max Bowsher" <ma...@ukf.net> writes:
> 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.

Thanks, Max.  Applied in revision 6816... So you don't have to file an
issue about this one :-).

-Karl

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