[PATCH 1 of 1] fix issue 1625: incorrect path separator and ui.slash setting handling on Windows
Alejandro Santos
alejolp at alejolp.com
Tue Apr 28 20:34:18 CDT 2009
# HG changeset patch
# User Alejandro Santos <alejolp at alejolp.com>
# Date 1240963582 10800
# Node ID 4942e4b21a262049520148f95478a05a5985b1da
# Parent c8c231da59c36b8a19f86c090e2f9f450d7b7029
fix issue 1625: incorrect path separator and ui.slash setting handling on Windows
diff -r c8c231da59c36b8a19f86c090e2f9f450d7b7029 -r 4942e4b21a262049520148f95478a05a5985b1da mercurial/commands.py
--- a/mercurial/commands.py Sun Apr 26 16:49:47 2009 -0500
+++ b/mercurial/commands.py Tue Apr 28 21:06:22 2009 -0300
@@ -1816,16 +1816,21 @@
end = opts.get('print0') and '\0' or '\n'
rev = opts.get('rev') or None
+ # The slash that has to be used according to the user config
+ cfgslash = ui.configbool('ui', 'slash') and '/' or os.sep
+
ret = 1
m = cmdutil.match(repo, pats, opts, default='relglob')
m.bad = lambda x,y: False
for abs in repo[rev].walk(m):
if not rev and abs not in repo.dirstate:
continue
+ absfix = cfgslash.join(abs.split('/'))
if opts.get('fullpath'):
- ui.write(repo.wjoin(abs), end)
+ fullpath = cfgslash.join(repo.wjoin(absfix).split(os.sep))
+ ui.write(fullpath, end)
else:
- ui.write(((pats and m.rel(abs)) or abs), end)
+ ui.write(((pats and m.rel(absfix)) or absfix), end)
ret = 0
return ret
More information about the Mercurial-devel
mailing list