caches: record 'desc' attribute on transaction
This is useful to know if a transaction if server side or not.
--- a/hgext3rd/evolve/__init__.py Fri Jan 05 04:37:49 2018 +0100
+++ b/hgext3rd/evolve/__init__.py Fri Jan 05 22:17:27 2018 +0100
@@ -423,6 +423,15 @@
if obsolete.isenabled(repo, 'exchange'):
repo.ui.setconfig('server', 'bundle1', False)
+ class trdescrepo(repo.__class__):
+
+ def transaction(self, desc, *args, **kwargs):
+ tr = super(trdescrepo, self).transaction(desc, *args, **kwargs)
+ tr.desc = desc
+ return tr
+
+ repo.__class__ = trdescrepo
+
@eh.uisetup
def _configurecmdoptions(ui):
# Unregister evolve commands if the command capability is not specified.