addremove: respect ui.relative-paths
I previously changed these code paths while trying to not change any
behavior to avoid inconsistencies between them in the intermediate
commits. They're now all ready to be switched over to respecting
ui.relative-paths.
Differential Revision: https://phab.mercurial-scm.org/D5936
windows: use util.localpath for repo-relative paths in getuipathfn()
Now that we have a single place that translates from internal path
representation (slash-separated) to UI representation
(i.e. scmutil.getuipathfn()), let's switch that over to using
util.localpath for absolute paths. I don't expect any test impact on
Windows because we still respect ui.slash, which is set by the test
runner.
As Yuya pointed out,
a997163e7fae (status: extract helper for
producing relative or absolute path for UI, 2019-01-29) accidentally
changed to slash-separated paths on Windows because it used used to
use repo.pathto(f, cwd='') (which calls util.localpath()) and after
that patch it just prints the filename without any
transformation. This patch should fix that regression.
Differential Revision: https://phab.mercurial-scm.org/D5935
walkchangerevs: obey allfiles parameter when taking the slow path
When walkchangerevs sees that there's a pattern, it hits the slow
path. The slow path in turn reverts to the old dumb grep behaviour of
only looking at files changed at each revision. Therefore, a command
such as
hg grep -l --all-files '.*' 'glob:**'
would show you all the nonempty files touched by the current revision.
This modifies that behaviour to look at the manifest at each revision
instead of the changed files in case that --all-files was requested.