Mercurial > hg
changeset 24704:03f92741487f
shelve: acquire lock in the right order
Text book says that 'wlock' should be acquired before 'lock'.
Caught through developer warning.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sun, 12 Apr 2015 14:59:31 -0400 |
parents | 868cec6409c4 |
children | 0ead0a07ed9c |
files | hgext/shelve.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)