In _cicp_canonical_relpath (osutils.py)
This is done: return current[len(abs_base)+1:]
Can we not just use os.path.split instead?
>>> import os >>> os.path.split("t:/fish") ('t:/', 'fish') >>> os.path.split("t:/and/chips/fish") ('t:/and/chips', 'fish') >>> os.path.split("fish") ('', 'fish') >>>
C:\bzr\bazaar\trunk>bzr diff === modified file 'bzrlib/osutils.py' --- bzrlib/osutils.py 2009-07-23 16:01:17 +0000 +++ bzrlib/osutils.py 2009-10-02 23:15:55 +0000 @@ -1093,7 +1093,7 @@ # the target of a move, for example). current = pathjoin(current, bit, *list(bit_iter)) break - return current[len(abs_base)+1:] + return os.path.split(current)[1]
# XXX - TODO - we need better detection/integration of case-insensitive # file-systems; Linux often sees FAT32 devices (or NFS-mounted OSX
In _cicp_canonical _relpath (osutils.py)
This is done: len(abs_ base)+1: ]
return current[
Can we not just use os.path.split instead?
>>> import os split(" t:/fish" ) split(" t:/and/ chips/fish" ) split(" fish")
>>> os.path.
('t:/', 'fish')
>>> os.path.
('t:/and/chips', 'fish')
>>> os.path.
('', 'fish')
>>>
C:\bzr\ bazaar\ trunk>bzr diff
current = pathjoin(current, bit, *list(bit_iter)) len(abs_ base)+1: ] split(current) [1]
=== modified file 'bzrlib/osutils.py'
--- bzrlib/osutils.py 2009-07-23 16:01:17 +0000
+++ bzrlib/osutils.py 2009-10-02 23:15:55 +0000
@@ -1093,7 +1093,7 @@
# the target of a move, for example).
break
- return current[
+ return os.path.
# XXX - TODO - we need better detection/ integration of case-insensitive
# file-systems; Linux often sees FAT32 devices (or NFS-mounted OSX