# HG changeset patch # User Mads Kiilerich # Date 1326413947 -3600 # Node ID 2de1244361aa17e6f0e9b8e275a351eae7740aa9 # Parent 7eca9db689d63cc616872b82ae53e24c3084a0ec tests: lock before creating transaction in test-filelog diff -r 7eca9db689d6 -r 2de1244361aa tests/test-filelog --- a/tests/test-filelog Fri Jan 13 01:19:07 2012 +0100 +++ b/tests/test-filelog Fri Jan 13 01:19:07 2012 +0100 @@ -17,12 +17,17 @@ else: meta = {} - t = repo.transaction('commit') + lock = t = None try: + lock = repo.lock() + t = repo.transaction('commit') node = fl.add(text, meta, t, 0, nullid, nullid) return node finally: - t.close() + if t: + t.close() + if lock: + lock.release() def error(text): print 'ERROR: ' + text