Patchwork D7546: exchange: replace a "not x in ys" by more Pythonic "x not in ys"

login
register
mail settings
Submitter phabricator
Date Dec. 5, 2019, 5:03 p.m.
Message ID <differential-rev-PHID-DREV-txarbssrby353jqxyfeh-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43583/
State Superseded
Headers show

Comments

phabricator - Dec. 5, 2019, 5:03 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Found by one of our (Google-)internal tools.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/exchange.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -2577,7 +2577,7 @@ 
 ):
     """add phase heads part to the requested bundle"""
     if kwargs.get('phases', False):
-        if not b2caps or not b'heads' in b2caps.get(b'phases'):
+        if not b2caps or b'heads' not in b2caps.get(b'phases'):
             raise error.Abort(_(b'no common phases exchange method'))
         if heads is None:
             heads = repo.heads()