changeset 3083:d59d6413bb68

topics/transaction: return immediately if we are in the middle of a transaction
author Aurélien Campéas
date Fri, 22 Sep 2017 18:01:29 +0200
parents 4746b92cc1f8
children 62201935e1a7
files hgext3rd/topic/__init__.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py
+++ b/hgext3rd/topic/__init__.py
@@ -313,7 +313,10 @@
             return peer
 
         def transaction(self, *a, **k):
+            ctr = self.currenttransaction()
             tr = super(topicrepo, self).transaction(*a, **k)
+            if ctr is not None:
+                return tr
 
             reporef = weakref.ref(self)