changeset 39342:d52fa7ddd1ac

shelve: move createcmd next to _docreatecmd It is simpler not to have to jump around the file all the time.
author Boris Feld <boris.feld@octobus.net>
date Thu, 23 Aug 2018 00:51:38 +0200
parents ca2f4dabf51d
children bab58b1d87c7
files hgext/shelve.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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()