如何将现有 VS 项目添加到 Mercurial(使用 TortoiseHG 或 VirtualHG)

发布于 2024-12-08 03:40:11 字数 289 浏览 0 评论 0原文

我是 Mercurial / TortoiseHG / VirtualHG 的新手。在阅读了一些教程后,我仍然无法理解它应该如何工作。

有人可以通过几个简单的步骤解释一下如何使用 TortoiseHG 或 VirtualHG 将现有的 VS2010 项目添加到 Mercurial 中,以及如何从那里开始?

那么将其添加到 Mercurial 后,我需要做什么才能再次开始该项目呢?几年前,我曾使用 Visual SourceSafe,所以也许这种经历现在让我感到困惑。

我也想知道当同事想要参与这个项目时该怎么做。

I am new to Mercurial / TortoiseHG / VirtualHG. After reading some tutorials I still fail to understand how it is supposed to work.

Could someone please explain in a few simple steps how I add an existing VS2010 project to Mercurial using TortoiseHG or VirtualHG, and how I go from there?

So after adding it to Mercurial, what do I need to do to start working on this project again? Years ago I have worked with Visual SourceSafe, so maybe this experience confuses me right now.

Also I'd like to know what to do when colleagues want to work on this project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

纵情客 2024-12-15 03:40:11

我在评论中看到您设法将源文件置于版本控制之下:

$ hg init
# (setup .hgignore)
$ hg add
$ hg commit

太棒了!要与同事共享项目,您需要以某种方式让他们可以访问存储库。您有三个选项:

  • 文件系统访问:如果您已经有共享网络驱动器设置,这是最简单的。您将存储库放在每个人都可以读写的共享驱动器上。人们从驱动器克隆回自己的机器并处理那里的文件。他们也在那里提交,最后使用 hg Push 将更改发送回共享驱动器上的存储库。

    确保每个人都使用具有此类设置的版本 2.0 或更高版本! Mercurial 的早期版本中存在错误,当推送到网络驱动器上的存储库时,可能会导致存储库损坏。

  • HTTP 服务器:您可以使用 hgserve 在 Mercurial 中启动内置网络服务器。该服务器可用于克隆。在受信任的环境中,您可以将其启动为

    $ hgserve --config "web.push_ssl=no" --config "web.allow_push=*"
    

    禁用默认安全设置并允许任何人将新更改推送到服务器。

    对于更繁重的使用,我们建议设置一个“真正的”网络服务器并安装 Mercurial 附带的 hgweb(快速)CGI 脚本。请参阅 Mercurial wiki 了解相关信息。

  • SSH 服务器:如果您有一个现有的 Unix 设置,人们可以通过 SSH 登录到中央服务器,那么这很容易。您需要在服务器上安装 Mercurial 并在那里创建一个人们具有读写访问权限的存储库。这也在 wiki 中介绍。

I see in the comments that you managed to get your source files under version control with:

$ hg init
# (setup .hgignore)
$ hg add
$ hg commit

Great! To share the project with your colleguages you need to make the repository accessible to them somehow. You have three options:

  • Filesystem access: This is the easiest if you already have a shared network drive setup. You put the repository on the shared drive where everybody can read and write. People make a clone from the drive back to their own machine and work on the files there. They commit there as well and finally use hg push to send their changes back to the repository on the shared drive.

    Make sure that everybody uses version 2.0 or later with such a setup! There has been bugs in earlier versions of Mercurial that could cause repository corruption when pushing to a repository on a network drive.

  • HTTP server: You can use hg serve to start a built-in webserver in Mercurial. The server can be used to clone from. In a trusted environment you can start it as

    $ hg serve --config "web.push_ssl=no" --config "web.allow_push=*"
    

    to disable the default security settings and allow anybody to push new changes to the server.

    For more heavy-duty use, we recommend setting up a "real" webserver and install the hgweb (Fast)CGI script that comes with Mercurial. See the Mercurial wiki for information on that.

  • SSH server: This is easy if you have an existing Unix setup where people have SSH login to a central server. You need to install Mercurial on the server and create a repository there that people have read and write access to. This is also covered in the wiki.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文