如何将在本地PC上创建的Mercurial存储库移动到Web服务器? [英] How to move a Mercurial repository created on a local PC to a web server?
问题描述
我已经创建并提交到在本地驱动器上创建的Mercurial存储库.现在,我有一个远程Windows 2003 Web服务器设置,可以通过hgwebdir.cgi提供存储库.
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.
如何将本地创建的存储库移至Web服务器?
How do I move the locally created repository to the web server?
看起来像本地驱动器上的.hg文件夹的ftp到远程Web服务器的欺骗.我做对了吗?有没有更有效的方法?
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?
推荐答案
复制.hg
目录是一种完全有效的方法.
Copying the .hg
directory is a completely valid way to do it.
注意::如果您有.hg/hgrc
文件,则可能要排除,删除或编辑它,因为它可能包含到存储库原始位置的绝对路径.
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.
您还可以在远程服务器上初始化一个空的存储库,确保正确设置了写权限,然后运行hg push https://wherever
.我没有测量,但我想这种方法会比较慢.
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.
这篇关于如何将在本地PC上创建的Mercurial存储库移动到Web服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!