如何在现有 Eclipse 项目中打开 Mercurial?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2517255/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to turn on Mercurial in existing Eclipse project?
提问by Rabarberski
I've installed the HgEclipse plugin for Mercurial integration in Eclipse. I have an existing (Java) project in Eclipse, but I can't figure out how to turn on mercurial change tracking for this existing project.
我已经在 Eclipse 中安装了用于 Mercurial 集成的 HgEclipse 插件。我在 Eclipse 中有一个现有的 (Java) 项目,但我不知道如何为这个现有项目打开 mercurial 更改跟踪。
It seems I can do an import of a mercurial project (File > Import > Mercurial > Clone ...), but that's only for new Eclipse projects...
似乎我可以导入一个 mercurial 项目(文件 > 导入 > Mercurial > Clone ...),但这仅适用于新的 Eclipse 项目......
Of course, I can apply Mercurial via the command line, e.g. hg initin the project directory, but this doesn't get picked up in Eclipse.
当然,我可以通过命令行应用 Mercurial,例如hg init在项目目录中,但这不会在 Eclipse 中获取。
So, how do I turn on Mercurial for existingEclipse projects?
那么,如何为现有的Eclipse 项目打开 Mercurial ?
回答by David Holbrook
Right click on project go to "Team" -> "Share Project" select "Mercurial" and go through the wizard steps.
右键单击项目转到“团队”->“共享项目”选择“Mercurial”并完成向导步骤。
回答by nullsage
When you are trying to push your project to your repository the above answer is correct for the initial part, but a step by step would be more like this:
当您尝试将项目推送到您的存储库时,上述答案对于初始部分是正确的,但一步一步更像是这样:
- Create project(or maybe it is already created)
- Right click the project
- Mouse over team
- Click "Share Project..."
- Select Mercurial then click next
- Click Finish
- Right click on project again and mouse over team
- Click "Push..." (it is important to commit before pushing 99% of the time)
- Type in the url of your repository(repo)
- Type in username and password then click finish
- 创建项目(或者它可能已经创建)
- 右键单击项目
- 鼠标悬停在团队上
- 单击“共享项目...”
- 选择 Mercurial 然后点击下一步
- 单击完成
- 再次右键单击项目并将鼠标悬停在团队上
- 单击“推送...”(在推送 99% 的时间之前提交很重要)
- 输入您的存储库的 url (repo)
- 输入用户名和密码,然后点击完成

