mercurial/commands.py
changeset 21818 448714b79d9a
parent 21817 6b0275e5f276
child 21819 816754e75f2f
--- 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()