Patchwork D3215: py3: use bytes instead of str in isinstance()

login
register
mail settings
Submitter phabricator
Date April 10, 2018, 2:15 p.m.
Message ID <differential-rev-PHID-DREV-ne4abq7lhdt44ou3favn-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30624/
State Superseded
Headers show

Comments

phabricator - April 10, 2018, 2:15 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We deal with bytes internally and things should be bytes

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -677,7 +677,7 @@ 
             write = self.ui.warn
 
         if all_patches or self.ui.verbose:
-            if isinstance(idx, str):
+            if isinstance(idx, bytes):
                 idx = self.series.index(idx)
             pushable, why = self.pushable(idx)
             if all_patches and pushable: