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

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Dec 6 10:37:33 EST 2019


Closed by commit rHG0f6782df1100: exchange: replace a "not x in ys" by more Pythonic "x not in ys" (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

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()



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


More information about the Mercurial-devel mailing list