Patchwork D10425: profiling: use `util.expandpath` instead of `ui.expandpath` for output

login
register
mail settings
Submitter phabricator
Date April 14, 2021, 11:41 p.m.
Message ID <differential-rev-PHID-DREV-zkw224vyebnrky6gazif-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48740/
State Superseded
Headers show

Comments

phabricator - April 14, 2021, 11:41 p.m.
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




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

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()