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

login
register
mail settings
Submitter phabricator
Date Dec. 6, 2019, 3:37 p.m.
Message ID <0bcfeafe10699fd295cf3565dbfc4740@localhost.localdomain>
Download mbox | patch
Permalink /patch/43595/
State Not Applicable
Headers show

Comments

phabricator - Dec. 6, 2019, 3:37 p.m.
Closed by commit rHG0f6782df1100: exchange: replace a &quot;not x in ys&quot; by more Pythonic &quot;x not in ys&quot; (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7546?vs=18471&id=18485

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7546/new/

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

AFFECTED FILES
  mercurial/exchange.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
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()