Patchwork D2957: infinitepush: don't wrap bundle2.processparts while calling `hg unbundle`

login
register
mail settings
Submitter phabricator
Date March 30, 2018, 7:53 p.m.
Message ID <b7bd611fbf7258afae8eda62497a558d@localhost.localdomain>
Download mbox | patch
Permalink /patch/30007/
State Not Applicable
Headers show

Comments

phabricator - March 30, 2018, 7:53 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe5cd0ef5c362: infinitepush: don&#039;t wrap bundle2.processparts while calling `hg unbundle` (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2957?vs=7340&id=7429

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

AFFECTED FILES
  hgext/infinitepush/__init__.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel

Patch

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 @@ 
     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)