shelve: acquire lock in the right order
authorPierre-Yves David <pierre-yves.david@fb.com>
Sun, 12 Apr 2015 14:59:31 -0400
changeset 24704 03f92741487f
parent 24703 868cec6409c4
child 24705 0ead0a07ed9c
shelve: acquire lock in the right order Text book says that 'wlock' should be acquired before 'lock'. Caught through developer warning.
hgext/shelve.py
--- a/hgext/shelve.py	Sun Apr 12 14:54:53 2015 -0400
+++ b/hgext/shelve.py	Sun Apr 12 14:59:31 2015 -0400
@@ -544,8 +544,8 @@
     oldquiet = ui.quiet
     wlock = lock = tr = None
     try:
+        wlock = repo.wlock()
         lock = repo.lock()
-        wlock = repo.wlock()
 
         tr = repo.transaction('unshelve', report=lambda x: None)
         oldtiprev = len(repo)