D5907: copy: respect ui.relative-paths in copy/rename

Yuya Nishihara yuya at tcha.org
Sat Feb 9 22:37:58 EST 2019


> --- 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. It might
break some Windows tests, but it should already be broken since a997163e7fae.
Some (or all?) `uipathfn()`s have to respect `ui.slash` config on Windows.


More information about the Mercurial-devel mailing list