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/12 22:32:00 UTC
cvs2svn: Bug? (relative_path)
--------------------------------------------------------------------
def relative_name(cvsroot, fname):
l = len(cvsroot)
if fname[:l] == cvsroot:
if fname[l] == '/':
return fname[l+1:]
return fname[l:]
return l
--------------------------------------------------------------------
That last "return l" looks odd. I'm pretty sure it shouldn't be returning a
number on failiure
How about the following code?
--------------------------------------------------------------------
sys.stderr.write('relative_path("%s", "%s"): fname is not a sub-path of'
' cvsroot\n' % (cvsroot, fname))
sys.exit(1)
--------------------------------------------------------------------
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org