D8001: pathauditor: drop a redundant call to bytes.lower()
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sat Jan 25 01:40:21 UTC 2020
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
`_lowerclean(s)` calls `s.lower()`, so we don't need to do that before
calling it.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8001
AFFECTED FILES
mercurial/pathutil.py
CHANGE DETAILS
diff --git a/mercurial/pathutil.py b/mercurial/pathutil.py
--- a/mercurial/pathutil.py
+++ b/mercurial/pathutil.py
@@ -84,7 +84,7 @@
_(b"path contains illegal component: %s") % path
)
if b'.hg' in _lowerclean(path):
- lparts = [_lowerclean(p.lower()) for p in parts]
+ lparts = [_lowerclean(p) for p in parts]
for p in b'.hg', b'.hg.':
if p in lparts[1:]:
pos = lparts.index(p)
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list