##// END OF EJS Templates
shelve: widen wlock scope of shelve for consistency while processing...
FUJIWARA Katsunori -
r27197:6df3ec5b default
parent child Browse files
Show More
@@ -224,7 +224,13 b' def _aborttransaction(repo):'
224
224
225 def createcmd(ui, repo, pats, opts):
225 def createcmd(ui, repo, pats, opts):
226 """subcommand that creates a new shelve"""
226 """subcommand that creates a new shelve"""
227 wlock = repo.wlock()
228 try:
229 return _docreatecmd(ui, repo, pats, opts)
230 finally:
231 lockmod.release(wlock)
227
232
233 def _docreatecmd(ui, repo, pats, opts):
228 def mutableancestors(ctx):
234 def mutableancestors(ctx):
229 """return all mutable ancestors for ctx (included)
235 """return all mutable ancestors for ctx (included)
230
236
@@ -285,9 +291,8 b' def createcmd(ui, repo, pats, opts):'
285
291
286 name = opts['name']
292 name = opts['name']
287
293
288 wlock = lock = tr = None
294 lock = tr = None
289 try:
295 try:
290 wlock = repo.wlock()
291 lock = repo.lock()
296 lock = repo.lock()
292
297
293 # use an uncommitted transaction to generate the bundle to avoid
298 # use an uncommitted transaction to generate the bundle to avoid
@@ -346,7 +351,7 b' def createcmd(ui, repo, pats, opts):'
346
351
347 _aborttransaction(repo)
352 _aborttransaction(repo)
348 finally:
353 finally:
349 lockmod.release(tr, lock, wlock)
354 lockmod.release(tr, lock)
350
355
351 def cleanupcmd(ui, repo):
356 def cleanupcmd(ui, repo):
352 """subcommand that deletes all shelves"""
357 """subcommand that deletes all shelves"""
General Comments 0
You need to be logged in to leave comments. Login now