mercurial/repair.py
changeset 25300 678d0bfdd31a
parent 24863 f3558829471b
child 25340 28800ab40395
--- a/mercurial/repair.py	Wed May 27 12:14:10 2015 -0400
+++ b/mercurial/repair.py	Sat May 23 21:18:47 2015 -0700
@@ -151,6 +151,12 @@
 
     mfst = repo.manifest
 
+    curtr = repo.currenttransaction()
+    if curtr is not None:
+        del curtr  # avoid carrying reference to transaction for nothing
+        msg = _('programming error: cannot strip from inside a transaction')
+        raise util.Abort(msg, hint=_('contact your extension maintainer'))
+
     tr = repo.transaction("strip")
     offset = len(tr.entries)