IDE独立的mercurial存储库
我最近刚刚开始使用 Mercurial,并希望我的项目尽可能独立于 IDE。
因此,我只想在存储库中包含我的 src、测试 src 和 doc 目录。 我设法通过忽略所有项目相关文件来仅将这些目录预订到存储库中。
问题是,当我将其克隆到另一个系统时,Netbeans 7 想要从这些文件创建一个新项目。它通过在存储库内部而不是在克隆名称上创建项目文件来实现这一点,因为它无法在已存在的目录上创建项目。
是否有一种标准方法可以在这些文件夹中进行预订,然后在克隆它们以从中创建项目时?
I've just recently started using Mercurial and would like to keep my projects as independent from IDE as possible.
Therefore, I would like to only include my src, test src, and doc directory in the repository.
I've managed to only book these directories into the repository by ignoring all project related files.
The problem is that when I then clone it onto another system, Netbeans 7 wants to create a new project from these files. It does so by creating the project file inside of the repo instead of on the cloned name, since it cannot create a project on a directory that already exists.
Is there a standard way of booking in these folders and then when cloning them to create a project from them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先在 Netbeans 中创建项目并将文件克隆到其中怎么样?
为了避免 Mercurial 抱怨克隆目标不为空,请在项目目录中使用 init + pull 而不是克隆,这是等效的:
您也可以克隆到一个单独的目录,然后移动所有文件(包括隐藏的 .hg 目录)进入 Netbeans 项目。您甚至可以只移动 .hg 目录,因为这确实是 Mercurial 所关心的。
尽管实际上我很惊讶您无法启动文件系统上已有的项目。我对 Netbeans 不熟悉,但是不能从文件系统导入现有项目吗?
What about creating the project in Netbeans first and the cloning the files into it?
To avoid Mercurial complaining about the clone destination not being empty, use init + pull in the project directory instead of clone, this is equivalent:
You could also just clone into a separate directory and then move all files (including the hidden .hg directory) into the Netbeans project. You could even just move the .hg directory, because that’s really all that Mercurial cares about.
Although actually I’m surprised you can’t start a project that is already on the file system. I’m not familiar with Netbeans, but can’t you import an existing project from the file system?