How to move a Mercurial repository created on a local PC to a web server?

橙三吉。 提交于 2019-12-10 14:55:21

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/2654341/how-to-move-a-mercurial-repository-created-on-a-local-pc-to-a-web-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!