mercurial/commands.py
changeset 21818 448714b79d9a
parent 21817 6b0275e5f276
child 21819 816754e75f2f
equal deleted inserted replaced
21817:6b0275e5f276 21818:448714b79d9a
  5243     """
  5243     """
  5244 
  5244 
  5245     if opts["stdio"] and opts["cmdserver"]:
  5245     if opts["stdio"] and opts["cmdserver"]:
  5246         raise util.Abort(_("cannot use --stdio with --cmdserver"))
  5246         raise util.Abort(_("cannot use --stdio with --cmdserver"))
  5247 
  5247 
  5248     def checkrepo():
  5248     if opts["stdio"]:
  5249         if repo is None:
  5249         if repo is None:
  5250             raise error.RepoError(_("there is no Mercurial repository here"
  5250             raise error.RepoError(_("there is no Mercurial repository here"
  5251                               " (.hg not found)"))
  5251                               " (.hg not found)"))
  5252 
       
  5253     if opts["stdio"]:
       
  5254         checkrepo()
       
  5255         s = sshserver.sshserver(ui, repo)
  5252         s = sshserver.sshserver(ui, repo)
  5256         s.serve_forever()
  5253         s.serve_forever()
  5257 
  5254 
  5258     if opts["cmdserver"]:
  5255     if opts["cmdserver"]:
  5259         s = commandserver.server(ui, repo, opts["cmdserver"])
  5256         s = commandserver.server(ui, repo, opts["cmdserver"])