[PATCH 2 of 3] use new function ui.disppath in existing places
Simon Heimberg
simohe at besonet.ch
Wed Mar 20 05:39:37 CDT 2013
# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1363775805 -3600
# Node ID bb678b1a26e52bcc390bb4f48896a1ed1db3bc35
# Parent 1b3fe856c993907ba4e14663e8c293f4f32333e8
use new function ui.disppath in existing places
diff -r 1b3fe856c993 -r bb678b1a26e5 mercurial/commands.py
--- a/mercurial/commands.py Mit Mär 20 11:36:43 2013 +0100
+++ b/mercurial/commands.py Mit Mär 20 11:36:45 2013 +0100
@@ -2505,9 +2505,7 @@
items = list(repo.walk(m))
if not items:
return
- f = lambda fn: fn
- if ui.configbool('ui', 'slash') and os.sep != '/':
- f = lambda fn: util.normpath(fn)
+ f = ui.disppath
fmt = 'f %%-%ds %%-%ds %%s' % (
max([len(abs) for abs in items]),
max([len(m.rel(abs)) for abs in items]))
diff -r 1b3fe856c993 -r bb678b1a26e5 mercurial/dirstate.py
--- a/mercurial/dirstate.py Mit Mär 20 11:36:43 2013 +0100
+++ b/mercurial/dirstate.py Mit Mär 20 11:36:45 2013 +0100
@@ -131,10 +131,6 @@
return ignore.ignore(self._root, files, self._ui.warn)
@propertycache
- def _slash(self):
- return self._ui.configbool('ui', 'slash') and os.sep != '/'
-
- @propertycache
def _checklink(self):
return util.checklink(self._root)
@@ -200,9 +196,7 @@
if cwd is None:
cwd = self.getcwd()
path = util.pathto(self._root, cwd, f)
- if self._slash:
- return util.normpath(path)
- return path
+ return self._ui.disppath(path)
def __getitem__(self, key):
'''Return the current state of key (a filename) in the dirstate.
More information about the Mercurial-devel
mailing list