Mercurial > hg
changeset 37205:e5cd0ef5c362
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
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 27 Mar 2018 17:19:02 +0530 |
parents | 0d6c12668691 |
children | 571f25dae740 |
files | hgext/infinitepush/__init__.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)