如何将新项目推送到共享 Mercurial 多存储库?
我有一台本地计算机(“笔记本电脑”)和另一台计算机(“服务器”)上的共享 Mercurial 存储库。
共享存储库按照 Mercurial 文档中所述使用 Apache 设置为多存储库、hgwebdir.cgi 脚本和 Mercurial 1.4。
该设置的工作原理是,我可以在 Web 浏览器中浏览项目(存储库),我可以从服务器克隆和拉取,并且当项目/存储库已存在于服务器上时,我可以从笔记本电脑进行推送。
但我无法在笔记本电脑上创建新项目(hg init、do stuff、hg commit)并将其推送到共享多存储库(hg push http://server/hg/my-new-project-name) - 我得到“abort: HTTP Error 404: Not Found”,大概是因为目录/项目存储库尚不存在。
如何将新的项目/目录结构推送到在其他地方运行的 Mercurial?我在文档中找不到任何内容,请问你们是如何做到的?
I have a local machine ("laptop") and a shared Mercurial repository on another machine ("server").
The shared repository is set up as a multi-repository as described in the Mercurial documentation using Apache, the hgwebdir.cgi script and Mercurial 1.4.
The setup works in the sense that I can browse the projects (repositories) in the web browser, I can clone and pull from the server, and I can push from the laptop when the project/repository already exists on the server.
But I cannot create a new project on the laptop (hg init, do stuff, hg commit) and push it to the shared multi-repository (hg push http://server/hg/my-new-project-name) - I get "abort: HTTP Error 404: Not Found", presumably because the directory/project repository does not exist yet.
How can I push a new project/directory structure to a Mercurial running elsewhere? I couldn't find anything in the documentation, how do you guys do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无法使用内置功能通过 http 创建新的远程存储库。您的选择是任一:
You cannot create new remote repositories over http with the built-in functionality. Your options are to either:
hg init
where you want the repo. After that you can push to the new empty repo更新
我尝试按照如下所述使用 Dropbox,但无法使其足够可靠,因此我不推荐该选项。
原始答案如下,保留上下文。
/update
我发现了另一个选项:完全跳过 http 和 ssh 以及 使用 Dropbox 共享存储库。
对于一个人多台计算机的场景,它看起来是最简单的选择,并且您可以获得备份作为一个很好的副作用。
这是有关黑客新闻的讨论
Update
I tried using Dropbox as described below, but couldn't make it sufficiently reliable, so I'm not recommending that option.
Original answer below, kept for context.
/update
I found one more option: Skipping both http and ssh altogether and using Dropbox for shared repos.
For the one-person-multiple-computers scenario, it looks like the simplest option of the lot, and you get backups as a nice side effect.
Here is a discussion on Hacker News