# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-03-27 11:49:02 # Node ID e5cd0ef5c362f748cd43a0c54ad48c7f8316bd1a # Parent 0d6c12668691be93bc8612812bd21389b62067cd infinitepush: don't wrap bundle2.processparts while calling `hg unbundle` This patch adds dirty logic to check whether we are processing `hg unbundle` instead of an `hg incoming` to prevent the wrapping of bundle2.processparts function. Differential Revision: https://phab.mercurial-scm.org/D2957 diff --git a/hgext/infinitepush/__init__.py b/hgext/infinitepush/__init__.py --- a/hgext/infinitepush/__init__.py +++ b/hgext/infinitepush/__init__.py @@ -869,6 +869,13 @@ def _getorcreateinfinitepushlogger(op): return logger def processparts(orig, repo, op, unbundler): + + # make sure we don't wrap processparts in case of `hg unbundle` + tr = repo.currenttransaction() + if tr: + if tr.names[0].startswith('unbundle'): + return orig(repo, op, unbundler) + if unbundler.params.get('infinitepush') != 'True': return orig(repo, op, unbundler)