Patchwork D2040: py3: use .startswith() instead of bytes[0]

login
register
mail settings
Submitter phabricator
Date Feb. 5, 2018, 2:27 p.m.
Message ID <b8d49471ea91ebb125e319e5bc1f1a13@localhost.localdomain>
Download mbox | patch
Permalink /patch/27318/
State Not Applicable
Headers show

Comments

phabricator - Feb. 5, 2018, 2:27 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG7a991241f586: py3: use .startswith() instead of bytes[0] (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2040?vs=5198&id=5211

REVISION DETAIL
  https://phab.mercurial-scm.org/D2040

AFFECTED FILES
  mercurial/revset.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -1841,7 +1841,7 @@ 
     keyflags = []
     for k in keys.split():
         fk = k
-        reverse = (k[0] == '-')
+        reverse = (k.startswith('-'))
         if reverse:
             k = k[1:]
         if k not in _sortkeyfuncs and k != 'topo':