# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-04-10 13:25:35 # Node ID fa6cdd6668e1531e8d8ec99c467081b08850adce # Parent 3740d1abde449286924ec8d9298999d304208390 py3: use .startswith() instead of bytes[0] Differential Revision: https://phab.mercurial-scm.org/D3214 diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -658,10 +658,11 @@ class queue(object): if not patchguards: return True, None guards = self.active() - exactneg = [g for g in patchguards if g[0] == '-' and g[1:] in guards] + exactneg = [g for g in patchguards + if g.startswith('-') and g[1:] in guards] if exactneg: return False, repr(exactneg[0]) - pos = [g for g in patchguards if g[0] == '+'] + pos = [g for g in patchguards if g.startswith('+')] exactpos = [g for g in pos if g[1:] in guards] if pos: if exactpos: