[PATCH] Fix issue 1625: On Windows, the locate command ignores the 'ui.slash' setting
mpm at selenic.com
Fri Jul 24 14:35:24 CDT 2009
On Fri, 2009-07-24 at 16:20 -0300, Alejandro Santos wrote:
> On Wed, Jul 22, 2009 at 9:03 PM, Matt Mackall<mpm at selenic.com> wrote:
> > The simplest thing to do is probably to have ui.slash=True replace
> > util.localpath with util.pconvert or otherwise directly affect its
> > behavior, much like we do for encoding settings.
> > Yes, this isn't perfect, as it's effectively a global variable. But the
> > alternative is quite hairy. We can't guarantee all users of localpath()
> > will have a repo or ui object handy to figure out what sort of slash to
> > use.
> > --
> > http://selenic.com : development and support for Mercurial and Linux
> After digging around [util|windows].localpath, pconvert and normpath I
> realized that this problem wouldn't exist if Windows would report
> paths separating directories with an '/' rather than the backslash
> So I have to ask: what kind of impact do you think that a wrap to
> osutil.listdir (and to os.listdir) would have, reporting paths
> separated with a slash '/' on Windows?
It might break things that are expecting os.sep. And it also won't deal
with command line args (ie filenames that aren't gotten via listdir)
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel