Patchwork [2,of,3] perf: release lock after transaction in perffncachewrite

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 3, 2016, 4:05 p.m.
Message ID <901855444329e0a4ad7a.1475510735@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/16835/
State Accepted
Headers show

Comments

Pierre-Yves David - Oct. 3, 2016, 4:05 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1470919879 -7200
#      Thu Aug 11 14:51:19 2016 +0200
# Node ID 901855444329e0a4ad7ad0e41cf0a1b6fd3ed5bc
# Parent  fbd46d349985f6baa9ea5439697920726757ad38
# EXP-Topic vfs.ward
perf: release lock after transaction in perffncachewrite

The transaction should be closed within the lock.

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -575,8 +575,8 @@  def perffncachewrite(ui, repo, **opts):
         s.fncache._dirty = True
         s.fncache.write(tr)
     timer(d)
+    tr.close()
     lock.release()
-    tr.close()
     fm.end()
 
 @command('perffncacheencode', formatteropts)