##// END OF EJS Templates
Add ui.slash hgrc setting...
Alexis S. L. Carvalho -
r4527:b422b558 default
parent child Browse files
Show More
@@ -439,6 +439,11 ui::
439 439 Reduce the amount of output printed. True or False. Default is False.
440 440 remotecmd;;
441 441 remote command to use for clone/push/pull operations. Default is 'hg'.
442 slash;;
443 Display paths using a slash ("/") as the path separator. This only
444 makes a difference on systems where the default path separator is not
445 the slash character (e.g. Windows uses the backslash character ("\")).
446 Default is False.
442 447 ssh;;
443 448 command to use for SSH connections. Default is 'ssh'.
444 449 strict;;
@@ -27,6 +27,7 class dirstate(object):
27 27 self.copymap = {}
28 28 self.ignorefunc = None
29 29 self._branch = None
30 self._slash = None
30 31
31 32 def wjoin(self, f):
32 33 return os.path.join(self.root, f)
@@ -47,7 +48,12 class dirstate(object):
47 48 def pathto(self, f, cwd=None):
48 49 if cwd is None:
49 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 58 def hgignore(self):
53 59 '''return the contents of .hgignore files as a list of patterns.
General Comments 0
You need to be logged in to leave comments. Login now