hgext/shelve.py
changeset 27834 476f53058ee8
parent 27775 3ea35a0769fe
child 27835 c448d7e00bf9
equal deleted inserted replaced
27833:321759dfc049 27834:476f53058ee8
   222         if dirstatebackup:
   222         if dirstatebackup:
   223             repo.vfs.unlink(dirstatebackup)
   223             repo.vfs.unlink(dirstatebackup)
   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()
   227     with repo.wlock():
   228     try:
       
   229         cmdutil.checkunfinished(repo)
   228         cmdutil.checkunfinished(repo)
   230         return _docreatecmd(ui, repo, pats, opts)
   229         return _docreatecmd(ui, repo, pats, opts)
   231     finally:
       
   232         lockmod.release(wlock)
       
   233 
   230 
   234 def _docreatecmd(ui, repo, pats, opts):
   231 def _docreatecmd(ui, repo, pats, opts):
   235     def mutableancestors(ctx):
   232     def mutableancestors(ctx):
   236         """return all mutable ancestors for ctx (included)
   233         """return all mutable ancestors for ctx (included)
   237 
   234