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
--- a/hgext/infinitepush/__init__.py Tue Mar 27 14:15:42 2018 +0530
+++ b/hgext/infinitepush/__init__.py Tue Mar 27 17:19:02 2018 +0530
@@ -869,6 +869,13 @@
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)