[PATCH 03 of 14 FIX-bundle2] applybundle: set 'bundle2=1' env for all transaction

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Oct 20 09:36:19 CDT 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1445348904 -7200
#      Tue Oct 20 15:48:24 2015 +0200
# Node ID 2e2e372d50d71af76fe290a7d745896a65b8f990
# Parent  00ab5df11ddd122686a34101b91e2ea15088da13
# EXP-Topic generaldelta
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
#              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 2e2e372d50d7
applybundle: set 'bundle2=1' env for all transaction

This should be set for all bundle2 application, we enforce that at a low level.
This is for courtesy with hooks.

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -302,10 +302,11 @@ def _notransaction():
     to be created"""
     raise TransactionUnavailable()
 
 def applybundle(repo, unbundler, tr, op=None):
     # transform me in unbundler.apply() as soon as the freeze is lifted
+    tr.hookargs['bundle2'] = '1'
     return processbundle(repo, unbundler, lambda: tr, op=op)
 
 def processbundle(repo, unbundler, transactiongetter=None, op=None):
     """This function process a bundle, apply effect to/from a repo
 


More information about the Mercurial-devel mailing list