# HG changeset patch # User Yuya Nishihara # Date 1398941683 -32400 # Node ID 448714b79d9af242e592d9d2d6736a1bf84c9460 # Parent 6b0275e5f27696226595c114c9bf034519aaad45 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. diff -r 6b0275e5f276 -r 448714b79d9a mercurial/commands.py --- 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()