D12287: match: delete Python 2 conditional code
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Wed Mar 2 23:30:36 UTC 2022
indygreg 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/D12287
AFFECTED FILES
mercurial/match.py
CHANGE DETAILS
diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -583,10 +583,7 @@
if b'' in prefix_set:
return True
- if pycompat.ispy3:
- sl = ord(b'/')
- else:
- sl = '/'
+ sl = ord(b'/')
# We already checked that path isn't in prefix_set exactly, so
# `path[len(pf)] should never raise IndexError.
To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list