如何将本地 PC 上创建的 Mercurial 存储库移动到 Web 服务器?
我已经创建并提交到在我的本地驱动器上创建的 Mercurial 存储库。我现在有一个远程 Windows 2003 Web 服务器设置,可以通过 hgwebdir.cgi 为存储库提供服务。
如何将本地创建的存储库移至 Web 服务器?
看起来将本地驱动器上的 .hg 文件夹 ftp 到远程 Web 服务器就可以解决问题。我的做法正确吗?有更有效的方法吗?
I have created and committed to Mercurial repository that was created on my local drive. I now have a remote Windows 2003 web server setup to serve repositories via hgwebdir.cgi.
How do I move the locally created repository to the web server?
It looks like an ftp of the .hg folder on the local drive to the remote web server does the trick. Am I doing it the right way. Is there a more efficient way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
复制
.hg
目录是一种完全有效的方法。注意:您可能需要排除、删除或编辑
.hg/hgrc
文件(如果有),因为它可能包含指向该文件原始位置的绝对路径。存储库。您还可以在远程服务器上初始化一个空存储库,确保正确设置写入权限,然后运行
hg Push https://wherever
。我没有测量过,但我想这种方法会比较慢。Copying the
.hg
directory is a completely valid way to do it.NOTE: You will probably want to exclude, remove or edit the
.hg/hgrc
file if you have one, as it may contain an absolute path to the original location of the repository.You could also initialise an empty repository on the remote server, ensure that write permissions are set up correctly, and then run
hg push https://wherever
. I haven't measured, but I imagine that this method would be slower.