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

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon Feb 11 11:43:12 EST 2019

martinvonz added a comment.

  In https://phab.mercurial-scm.org/D5907#86706, @yuja wrote:
  > >   `getuipathfn()` uses `repo.pathto()` when a relative path was requested (including by setting `legacyrelativevalue=True` or `forcerelativevalue=True`), so I think there shouldn't be much change in behavior with that commit.
  > But the default of `hg status` is `relative=False`, so the status output
  >  would have significant change on Windows.
  Ohhh, now I see! `hg status` changed because it used `repo.pathto(f, cwd='')` in the non-relative case, and `repo.pathto()` calls `uitil.localpath()`. I think most or all of the other commands I've changed with recent patches simply use `f` the non-relative case. So I have hopefully only broken `hg status`. But I'll hopefully fix almost all of them to use native paths soon :)

  rHG Mercurial


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

More information about the Mercurial-devel mailing list