changeset 21818:448714b79d9a

serve: inline checkrepo() that is used only when --stdio is specified Since e811b93f2cb1, --cmdserver is allowed to start without repository, so checkrepo() function is meaningless.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 01 May 2014 19:54:43 +0900
parents 6b0275e5f276
children 816754e75f2f
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Jun 28 13:02:44 2014 +0900
+++ b/mercurial/commands.py	Thu May 01 19:54:43 2014 +0900
@@ -5245,13 +5245,10 @@
     if opts["stdio"] and opts["cmdserver"]:
         raise util.Abort(_("cannot use --stdio with --cmdserver"))
 
-    def checkrepo():
+    if opts["stdio"]:
         if repo is None:
             raise error.RepoError(_("there is no Mercurial repository here"
                               " (.hg not found)"))
-
-    if opts["stdio"]:
-        checkrepo()
         s = sshserver.sshserver(ui, repo)
         s.serve_forever()