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

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sun Feb 10 21:12:06 EST 2019

yuja added a comment.

  >   > 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?
  Probably. `pathto(f, cwd='')` would return backslash path 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.)
  Correct. Path handling on Windows seemed inconsistent from the start. Some
  commands used to use `dirstate.pathto()` which always returns backslash/slash
  paths depending on ui.slash, and the others using `m.rel|abs|uipath()` don't.
  Since we have `scmutil.getuipathfn()` now, maybe we can fix the inconsistency?

  rHG Mercurial


To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel

More information about the Mercurial-devel mailing list