Mercurial > hg-stable
comparison mercurial/exchange.py @ 43813:0f6782df1100
exchange: replace a "not x in ys" by more Pythonic "x not in ys"
Found by one of our (Google-)internal tools.
Differential Revision: https://phab.mercurial-scm.org/D7546
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 05 Dec 2019 08:59:23 -0800 |
parents | 44b605638918 |
children | ea97cd64c500 |
comparison
equal
deleted
inserted
replaced
43812:d3f7bdc905fb | 43813:0f6782df1100 |
---|---|
2575 def _getbundlephasespart( | 2575 def _getbundlephasespart( |
2576 bundler, repo, source, bundlecaps=None, b2caps=None, heads=None, **kwargs | 2576 bundler, repo, source, bundlecaps=None, b2caps=None, heads=None, **kwargs |
2577 ): | 2577 ): |
2578 """add phase heads part to the requested bundle""" | 2578 """add phase heads part to the requested bundle""" |
2579 if kwargs.get('phases', False): | 2579 if kwargs.get('phases', False): |
2580 if not b2caps or not b'heads' in b2caps.get(b'phases'): | 2580 if not b2caps or b'heads' not in b2caps.get(b'phases'): |
2581 raise error.Abort(_(b'no common phases exchange method')) | 2581 raise error.Abort(_(b'no common phases exchange method')) |
2582 if heads is None: | 2582 if heads is None: |
2583 heads = repo.heads() | 2583 heads = repo.heads() |
2584 | 2584 |
2585 headsbyphase = collections.defaultdict(set) | 2585 headsbyphase = collections.defaultdict(set) |