##// END OF EJS Templates
Use util.normpath() instead of direct path string operation....
Shun-ichi GOTO -
r5842:111ed8c8 default
parent child Browse files
Show More
@@ -53,7 +53,7 b' def geturl(path):'
53 if os.path.isdir(path):
53 if os.path.isdir(path):
54 path = os.path.normpath(os.path.abspath(path))
54 path = os.path.normpath(os.path.abspath(path))
55 if os.name == 'nt':
55 if os.name == 'nt':
56 path = '/' + path.replace('\\', '/')
56 path = '/' + util.normpath(path)
57 return 'file://%s' % path
57 return 'file://%s' % path
58 return path
58 return path
59
59
@@ -751,7 +751,7 b' class svn_sink(converter_sink, commandli'
751 os.path.basename(path))
751 os.path.basename(path))
752 commandline(ui, 'svnadmin').run0('create', path)
752 commandline(ui, 'svnadmin').run0('create', path)
753 created = path
753 created = path
754 path = path.replace('\\', '/')
754 path = util.normpath(path)
755 if not path.startswith('/'):
755 if not path.startswith('/'):
756 path = '/' + path
756 path = '/' + path
757 path = 'file://' + path
757 path = 'file://' + path
@@ -15,7 +15,7 b' def tidyprefix(dest, prefix, suffixes):'
15 safe for consumers.'''
15 safe for consumers.'''
16
16
17 if prefix:
17 if prefix:
18 prefix = prefix.replace('\\', '/')
18 prefix = util.normpath(prefix)
19 else:
19 else:
20 if not isinstance(dest, str):
20 if not isinstance(dest, str):
21 raise ValueError('dest must be string if no prefix')
21 raise ValueError('dest must be string if no prefix')
@@ -87,7 +87,7 b' class dirstate(object):'
87 cwd = self.getcwd()
87 cwd = self.getcwd()
88 path = util.pathto(self._root, cwd, f)
88 path = util.pathto(self._root, cwd, f)
89 if self._slash:
89 if self._slash:
90 return path.replace(os.sep, '/')
90 return util.normpath(path)
91 return path
91 return path
92
92
93 def __getitem__(self, key):
93 def __getitem__(self, key):
General Comments 0
You need to be logged in to leave comments. Login now