pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2957

AFFECTED FILES
  hgext/infinitepush/__init__.py

CHANGE DETAILS

diff --git a/hgext/infinitepush/__init__.py b/hgext/infinitepush/__init__.py
--- a/hgext/infinitepush/__init__.py
+++ b/hgext/infinitepush/__init__.py
@@ -871,6 +871,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)
 



To: pulkit, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to