简体   繁体   English

hg服务只是挂在终端

[英]hg serve simply hangs in terminal

I've started using Mercurial for my personal projects and I'm currently going through Joel's tutorial here: http://hginit.com/02.html 我已经开始在我的个人项目中使用Mercurial,我现在正在浏览Joel的教程: http//hginit.com/02.html

The problem is when I type in hg serve in the terminal, it simply hangs. 问题是当我在终端输入hg serve时,它只是挂起。 Other commands like hg init works perfectly. 其他命令如hg init完美运行。 Anyone know what's going on? 有谁知道发生了什么?

I installed mercurial by doing this: sudo apt-get install mercurial meld 我通过这样做安装了mercurial: sudo apt-get install mercurial meld

You want to use the -d option to run it in the background: 您想使用-d选项在后台运行它:

hg serve -d

Otherwise it will just run as a foreground process, logging to stdout and stderr. 否则它将作为前台进程运行,记录到stdout和stderr。

Run hg help serve to see more options. 运行hg help serve以查看更多选项。

Try setting the port to something other than 8000, like hg serve -p 9001 . 尝试将端口设置为8000以外的其他设置,例如hg serve -p 9001 Could be a conflict. 可能是一场冲突。 Also note that when it runs, it doesn't print anything out to the terminal. 另请注意,当它运行时,它不会向终端打印任何内容。 It just sits there until you CTRL+C out of it. 它只是坐在那里直到你CTRL+C出来。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM