mercurial/match.py
changeset 48975 7f5e91cdebcd
parent 48966 6000f5b25c9b
child 49004 f254fc73d956
equal deleted inserted replaced
48974:f0c445a8e324 48975:7f5e91cdebcd
   581     # FIXME: Ideally we'd never get to this point if this is the case - we'd
   581     # FIXME: Ideally we'd never get to this point if this is the case - we'd
   582     # recognize ourselves as an 'always' matcher and skip this.
   582     # recognize ourselves as an 'always' matcher and skip this.
   583     if b'' in prefix_set:
   583     if b'' in prefix_set:
   584         return True
   584         return True
   585 
   585 
   586     if pycompat.ispy3:
   586     sl = ord(b'/')
   587         sl = ord(b'/')
       
   588     else:
       
   589         sl = '/'
       
   590 
   587 
   591     # We already checked that path isn't in prefix_set exactly, so
   588     # We already checked that path isn't in prefix_set exactly, so
   592     # `path[len(pf)] should never raise IndexError.
   589     # `path[len(pf)] should never raise IndexError.
   593     return any(path.startswith(pf) and path[len(pf)] == sl for pf in prefix_set)
   590     return any(path.startswith(pf) and path[len(pf)] == sl for pf in prefix_set)
   594 
   591