[Request] [+ ] D10425: profiling: use `util.expandpath` instead of `ui.expandpath` for output

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Wed Apr 14 23:41:02 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Given we are talking about the path to an output file, I am fairly certain that
  the initial author meant to expand `~` and the like and not to resolve entry
  from `[paths]`.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10425

AFFECTED FILES
  mercurial/profiling.py

CHANGE DETAILS

diff --git a/mercurial/profiling.py b/mercurial/profiling.py
--- a/mercurial/profiling.py
+++ b/mercurial/profiling.py
@@ -228,7 +228,7 @@
             if self._output == b'blackbox':
                 self._fp = util.stringio()
             elif self._output:
-                path = self._ui.expandpath(self._output)
+                path = util.expandpath(self._output)
                 self._fp = open(path, b'wb')
             elif pycompat.iswindows:
                 # parse escape sequence by win32print()



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210414/68be1bee/attachment-0001.html>


More information about the Mercurial-patches mailing list