diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
index 101e84121c136f01ecafbba086787ead51ed1913_bWVyY3VyaWFsL2J1bmRsZTIucHk=..53ca47ef645d2db003a25f939a491913fe784088_bWVyY3VyaWFsL2J1bmRsZTIucHk= 100644
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -318,6 +318,16 @@
     # - replace this is a init function soon.
     # - exception catching
     unbundler.params
+    if repo.ui.debugflag:
+        msg = ['bundle2-input-bundle:']
+        if unbundler.params:
+            msg.append(' %i params')
+        if op.gettransaction is None:
+            msg.append(' no-transaction')
+        else:
+            msg.append(' with-transaction')
+        msg.append('\n')
+        repo.ui.debug(''.join(msg))
     iterparts = unbundler.iterparts()
     part = None
     try:
diff --git a/tests/test-bundle2-format.t b/tests/test-bundle2-format.t
index 101e84121c136f01ecafbba086787ead51ed1913_dGVzdHMvdGVzdC1idW5kbGUyLWZvcm1hdC50..53ca47ef645d2db003a25f939a491913fe784088_dGVzdHMvdGVzdC1idW5kbGUyLWZvcm1hdC50 100644
--- a/tests/test-bundle2-format.t
+++ b/tests/test-bundle2-format.t
@@ -550,6 +550,7 @@
   $ hg unbundle2 --debug --config progress.debug=true < ../parts.hg2
   bundle2-input: start processing of HG20 stream
   bundle2-input: reading bundle2 stream parameters
+  bundle2-input-bundle: with-transaction
   bundle2-input: start extraction of bundle2 parts
   bundle2-input: part header size: 17
   bundle2-input: part type: "test:empty"