hgext/shelve.py
changeset 39369 d52fa7ddd1ac
parent 38908 ad24b581e4d9
child 39370 bab58b1d87c7
--- a/hgext/shelve.py	Sun Aug 05 13:34:04 2018 +0900
+++ b/hgext/shelve.py	Thu Aug 23 00:51:38 2018 +0200
@@ -323,12 +323,6 @@
     narrowspec.restorebackup(repo, narrowspecbackupname)
     repo.dirstate.restorebackup(None, dirstatebackupname)
 
-def createcmd(ui, repo, pats, opts):
-    """subcommand that creates a new shelve"""
-    with repo.wlock():
-        cmdutil.checkunfinished(repo)
-        return _docreatecmd(ui, repo, pats, opts)
-
 def getshelvename(repo, parent, opts):
     """Decide on the name this shelve is going to have"""
     def gennames():
@@ -430,6 +424,12 @@
 def _finishshelve(repo):
     _aborttransaction(repo)
 
+def createcmd(ui, repo, pats, opts):
+    """subcommand that creates a new shelve"""
+    with repo.wlock():
+        cmdutil.checkunfinished(repo)
+        return _docreatecmd(ui, repo, pats, opts)
+
 def _docreatecmd(ui, repo, pats, opts):
     wctx = repo[None]
     parents = wctx.parents()