Patchwork D2997: infinitepush: use bundleoperation.source instead of hacking on tr

login
register
mail settings
Submitter phabricator
Date March 31, 2018, 5:19 p.m.
Message ID <1ca88f65de72cd0f5ced46fe8e65c192@localhost.localdomain>
Download mbox | patch
Permalink /patch/30070/
State Not Applicable
Headers show

Comments

phabricator - March 31, 2018, 5:19 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG40ee0af04e3a: infinitepush: use bundleoperation.source instead of hacking on tr (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2997?vs=7464&id=7473

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

AFFECTED FILES
  hgext/infinitepush/__init__.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, indygreg
Cc: 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
@@ -927,10 +927,8 @@ 
 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 op.source == 'unbundle':
+        return orig(repo, op, unbundler)
 
     # this server routes each push to bundle store
     if repo.ui.configbool('infinitepush', 'pushtobundlestore'):