From patchwork Sat May 30 14:05:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D8600: scmutil: clarify getuipathfn comment From: phabricator X-Patchwork-Id: 46413 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Sat, 30 May 2020 14:05:56 +0000 valentin.gatienbaron created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D8600 AFFECTED FILES mercurial/scmutil.py CHANGE DETAILS To: valentin.gatienbaron, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -804,8 +804,8 @@ if relative: cwd = repo.getcwd() if cwd != b'': - # this branch is correct when cwd == b'', ie cwd = repo root, - # but it's slower + # this branch would work even if cwd == b'' (ie cwd = repo + # root), but its generality makes the returned function slower pathto = repo.pathto return lambda f: pathto(f, cwd) if repo.ui.configbool(b'ui', b'slash'):