Mercurial > hg
comparison mercurial/dirstate.py @ 5842:111ed8c871bf
Use util.normpath() instead of direct path string operation.
This change is intended to allow hooking normpath() by win32mbcs
extension for MBCS support.
author | Shun-ichi GOTO <shunichi.goto@gmail.com> |
---|---|
date | Wed, 09 Jan 2008 21:30:13 +0900 |
parents | f252ba975925 |
children | 83c354c4d529 |
comparison
equal
deleted
inserted
replaced
5841:07ca22a72dcc | 5842:111ed8c871bf |
---|---|
85 def pathto(self, f, cwd=None): | 85 def pathto(self, f, cwd=None): |
86 if cwd is None: | 86 if cwd is None: |
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): |
94 ''' current states: | 94 ''' current states: |
95 n normal | 95 n normal |