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.
--- 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()