Skip to content
Snippets Groups Projects
Commit 1651a3e61925 authored by mpm's avatar mpm
Browse files

fix repo locking

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

fix repo locking

We've actually got to assign the lock to a local variable, otherwise
it gets released immediately.

manifest hash: d55fc8858649c59ed9fa1f8cb90b63b33a71c223
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoMERywK+sNU5EO8RAgqwAKCPhmTOK/n5bjJ6Xh4mC9Q8mJDx4wCfZBGX
Uik+3sUcQRqgHjsP0fIjjiU=
=U1p0
-----END PGP SIGNATURE-----
parent ccbcc4d76f81
No related merge requests found
......@@ -346,7 +346,7 @@
self.join("undo"))
def recover(self):
self.lock()
lock = self.lock()
if os.path.exists(self.join("recover")):
self.ui.status("attempting to rollback interrupted transaction\n")
return rollback(self.opener, self.join("recover"))
......@@ -354,7 +354,7 @@
self.ui.warn("no interrupted transaction available\n")
def undo(self):
self.lock()
lock = self.lock()
if os.path.exists(self.join("undo")):
f = self.changelog.read(self.changelog.tip())[3]
self.ui.status("attempting to rollback last transaction\n")
......@@ -428,6 +428,7 @@
self.ui.status("nothing changed\n")
return
lock = self.lock()
tr = self.transaction()
# check in files
......@@ -807,5 +808,5 @@
if not generator: return
changesets = files = revisions = 0
self.lock()
source = genread(generator)
......@@ -811,4 +812,5 @@
source = genread(generator)
lock = self.lock()
tr = self.transaction()
# pull off the changeset group
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment