diff hgext/mq.py @ 4970:30d4d8985dd8

transactions: avoid late tear-down (issue641) We use weak references (ugh) to avoid having to manually delete transaction references out of each call frame when an exception occurs.
author Matt Mackall <mpm@selenic.com>
date Sun, 22 Jul 2007 14:53:57 -0500
parents 126f527b3ba3
children 7041869a1bf6
line wrap: on
line diff
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -442,7 +442,7 @@ class queue:
             lock = repo.lock()
             tr = repo.transaction()
             try:
-                ret = self._apply(tr, repo, series, list, update_status,
+                ret = self._apply(repo, series, list, update_status,
                                   strict, patchdir, merge, all_files=all_files)
                 tr.close()
                 self.save_dirty()
@@ -457,7 +457,7 @@ class queue:
         finally:
             del lock, wlock, tr
 
-    def _apply(self, tr, repo, series, list=False, update_status=True,
+    def _apply(self, repo, series, list=False, update_status=True,
                strict=False, patchdir=None, merge=None, all_files={}):
         # TODO unify with commands.py
         if not patchdir: