[PATCH 1 of 3] ui: define disppath for converting paths before showing to the user
Simon Heimberg
simohe at besonet.ch
Wed Mar 20 05:39:36 CDT 2013
# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1363775803 -3600
# Node ID 1b3fe856c993907ba4e14663e8c293f4f32333e8
# Parent a04dd2b1e40fcd6e22e057bb46d99c02f68d34f9
ui: define disppath for converting paths before showing to the user
diff -r a04dd2b1e40f -r 1b3fe856c993 mercurial/ui.py
--- a/mercurial/ui.py Son Mär 17 14:12:56 2013 +0100
+++ b/mercurial/ui.py Mit Mär 20 11:36:43 2013 +0100
@@ -391,6 +391,13 @@
return feature not in exceptions
return True
+ @util.propertycache
+ def disppath(self):
+ "returns a function converting path seperators for showing to the user"
+ if self.configbool('ui', 'slash') and os.sep != '/':
+ return util.normpath
+ return lambda p: p # no conversion
+
def username(self):
"""Return default username to be used in commits.
More information about the Mercurial-devel
mailing list