From patchwork Thu Dec 5 17:03:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7546: exchange: replace a "not x in ys" by more Pythonic "x not in ys" From: phabricator X-Patchwork-Id: 43583 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 5 Dec 2019 17:03:53 +0000 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 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()