Patchwork D10411: remotefilelog: use the right expandpath in to expand `~`

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

Comments

phabricator - April 14, 2021, 11:38 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Given the context where path is most likely a file system path, I suspect that
  the initial author confused ui.expandpath and util.expandpath (a proxy for
  os.path.expanduser and co)

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/remotefilelog/__init__.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py
--- a/hgext/remotefilelog/__init__.py
+++ b/hgext/remotefilelog/__init__.py
@@ -888,7 +888,7 @@ 
         progress.update(count)
         count += 1
         try:
-            path = ui.expandpath(os.path.normpath(path))
+            path = util.expandpath(os.path.normpath(path))
         except TypeError as e:
             ui.warn(_(b"warning: malformed path: %r:%s\n") % (path, e))
             traceback.print_exc()