Patchwork D12287: match: delete Python 2 conditional code

login
register
mail settings
Submitter phabricator
Date March 2, 2022, 11:30 p.m.
Message ID <differential-rev-PHID-DREV-y7wb4ppfbhi6osk77tst-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50629/
State New
Headers show

Comments

phabricator - March 2, 2022, 11:30 p.m.
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




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

Patch

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.