mercurial/dirstate.py
changeset 4527 b422b558015b
parent 4525 78b6add1f966
child 4604 0f6853c15606
equal deleted inserted replaced
4526:cbabc9ac7424 4527:b422b558015b
    25         self.pl = None
    25         self.pl = None
    26         self.dirs = None
    26         self.dirs = None
    27         self.copymap = {}
    27         self.copymap = {}
    28         self.ignorefunc = None
    28         self.ignorefunc = None
    29         self._branch = None
    29         self._branch = None
       
    30         self._slash = None
    30 
    31 
    31     def wjoin(self, f):
    32     def wjoin(self, f):
    32         return os.path.join(self.root, f)
    33         return os.path.join(self.root, f)
    33 
    34 
    34     def getcwd(self):
    35     def getcwd(self):
    45             return cwd
    46             return cwd
    46 
    47 
    47     def pathto(self, f, cwd=None):
    48     def pathto(self, f, cwd=None):
    48         if cwd is None:
    49         if cwd is None:
    49             cwd = self.getcwd()
    50             cwd = self.getcwd()
    50         return util.pathto(self.root, cwd, f)
    51         path = util.pathto(self.root, cwd, f)
       
    52         if self._slash is None:
       
    53             self._slash = self.ui.configbool('ui', 'slash') and os.sep != '/'
       
    54         if self._slash:
       
    55             path = path.replace(os.sep, '/')
       
    56         return path
    51 
    57 
    52     def hgignore(self):
    58     def hgignore(self):
    53         '''return the contents of .hgignore files as a list of patterns.
    59         '''return the contents of .hgignore files as a list of patterns.
    54 
    60 
    55         the files parsed for patterns include:
    61         the files parsed for patterns include: