topics/transaction: return immediately if we are in the middle of a transaction
authorAurélien Campéas
Fri, 22 Sep 2017 18:01:29 +0200
changeset 2987 d59d6413bb68
parent 2986 4746b92cc1f8
child 2988 62201935e1a7
topics/transaction: return immediately if we are in the middle of a transaction
hgext3rd/topic/__init__.py
--- a/hgext3rd/topic/__init__.py	Fri Sep 22 16:41:37 2017 +0200
+++ b/hgext3rd/topic/__init__.py	Fri Sep 22 18:01:29 2017 +0200
@@ -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)