我刚开始使用 Mercurial,我做了 google 作业,但我找不到解决方案。
这是服务器的输出,应该比我能更好地解释事情:
david@triton:~/www/triton$ ls -l -a | grep .hg
drwxr-xr-x 4 david david 4096 2011-11-19 17:44 .hg
-rw-r--r-- 1 david david 0 2011-11-18 22:23 .hgignore
david@triton:~/www/triton$ hg init
abort: repository . already exists!
david@triton:~/www/triton$ hg serve
abort: There is no Mercurial repository here (.hg not found)!
我正在尝试从 Windows 客户端上的 tortiseHG 推送到此服务器,但它也提示没有 repo 协议(protocol)。
这到底是怎么回事,伙计们?
最佳答案
hg init
只是检查 .hg
目录是否已经存在,它显然确实存在。尝试
$ ls -l .hg
ls: cannot access .hg: No such file or directory
$ mkdir .hg
$ hg init
abort: repository . already exists!
.hg
目录是如何到达那里的?如果你自己创造了它,你不应该拥有。你应该让 hg init
创建它,因为它在里面放了很多其他东西。您从 hg summary
得到什么输出?
关于Mercurial 不知道是否有 repo ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8198955/