D5907: copy: respect ui.relative-paths in copy/rename
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sun Feb 10 01:04:19 EST 2019
martinvonz added a comment.
In https://phab.mercurial-scm.org/D5907#86561, @yuja wrote:
> > - a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -51,8 +51,10 @@ )
> > if pycompat.iswindows: + from . import windows as platform from . import scmwindows as scmplatform else: + from . import posix as platform from . import scmposix as scmplatform
> It's `util.localpath()`.
> > @@ -757,7 +759,7 @@
> > pathto = repo.pathto
> > return lambda f: pathto(f, cwd)
> > else:
> > - return lambda f: f + return platform.localpath
> I've removed this since it seemed unrelated to this specific patch.
That was just something I was experimenting with and must have accidentally amended in. Thanks for fixing!
> It might
> break some Windows tests, but it should already be broken since https://phab.mercurial-scm.org/rHGa997163e7fae2fe933f8d0c6d1013205befd1ee4.
> Some (or all?) `uipathfn()`s have to respect `ui.slash` config on Windows.
Did that commit change any behavior on Windows? I was trying to figure out where the conversion to Windows paths was done and thought it seemed like it was mostly just done in `util.pathto()`, so e.g. `m.rel()` would use backslashes and `m.abs()` would use slashes. (I just learned that there is a deprecated ui.slash config too, but that doesn't seem to change much.)
To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel