Patchwork [03,of,10,PyPy] perf: close transaction in perffncachewrite

login
register
mail settings
Submitter Bryan O'Sullivan
Date Dec. 24, 2015, 12:22 a.m.
Message ID <7dabb0767ff9dd128135.1450916538@bryano-mbp.local>
Download mbox | patch
Permalink /patch/12337/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Bryan O'Sullivan - Dec. 24, 2015, 12:22 a.m.
This fixes a bug, and brings CPython behaviour on this test into
line with PyPy.

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -441,6 +441,7 @@  def perffncachewrite(ui, repo, **opts):
         s.fncache.write(tr)
     timer(d)
     lock.release()
+    tr.close()
     fm.end()
 
 @command('perffncacheencode', formatteropts)
diff --git a/tests/test-contrib-perf.t b/tests/test-contrib-perf.t
--- a/tests/test-contrib-perf.t
+++ b/tests/test-contrib-perf.t
@@ -123,8 +123,6 @@  perfstatus
   $ hg perffncacheencode
   $ hg perffncacheload
   $ hg perffncachewrite
-  transaction abort!
-  rollback completed
   $ hg perfheads
   $ hg perfindex
   $ hg perfloadmarkers