--- a/mercurial/dirstate.py Fri Jun 08 23:49:12 2007 -0300
+++ b/mercurial/dirstate.py Fri Jun 08 23:49:12 2007 -0300
@@ -27,6 +27,7 @@
self.copymap = {}
self.ignorefunc = None
self._branch = None
+ self._slash = None
def wjoin(self, f):
return os.path.join(self.root, f)
@@ -47,7 +48,12 @@
def pathto(self, f, cwd=None):
if cwd is None:
cwd = self.getcwd()
- return util.pathto(self.root, cwd, f)
+ path = util.pathto(self.root, cwd, f)
+ if self._slash is None:
+ self._slash = self.ui.configbool('ui', 'slash') and os.sep != '/'
+ if self._slash:
+ path = path.replace(os.sep, '/')
+ return path
def hgignore(self):
'''return the contents of .hgignore files as a list of patterns.