[英]Creating new project in Eclipse then adding it to a Mercurial repo
I have access to an existing Mercurial repo located at merc.myorg.com/hghome
. 我可以访问位于
merc.myorg.com/hghome
的现有Mercurial merc.myorg.com/hghome
。 I have been asked to whip up a simple Java tool and commit it to the repo under hghome/myapp
. 我被要求启动一个简单的Java工具,并将其提交到
hghome/myapp
下的hghome/myapp
。 I have never used Mercurial before, and would like to accomplish the following: 我以前从未使用过Mercurial,并且想要完成以下任务:
MercurialEclipse
plugin to get the sourcecode ( myapp
) up under hghome
MercurialEclipse
插件在hghome
下获取源代码( myapp
) My first thought was to write all the code in an Eclipse project, and then try to connect to hghome
somehow and push/copy all the code up to the server at the desired location. 我首先想到的是在Eclipse项目中编写所有代码,然后尝试以某种方式连接到
hghome
并将所有代码推送/复制到所需位置的服务器。 But then I figured that I probably can't push code to a repo/sub-repo ( hghome/myapp
) that doesn't exist yet. 但是后来我发现我可能无法将代码推送到尚不存在的repo / sub-repo(
hghome/myapp
)中。 So it feels like a chicken-and-the-egg sort of problem. 因此,这感觉就像是鸡到蛋的问题。
Let's pretend that myapp
is a simple (Eclipse) Java project with the following directory structure: 让我们假设
myapp
是一个简单的(Eclipse)Java项目,具有以下目录结构:
myapp/
src/main/java/ (Source Folder)
com.myorg.myapp (Package)
MyApp.java
build.xml
I have already installed Mercurial and the MercurialEclipse plugin. 我已经安装了Mercurial和MercurialEclipse插件。 What are the exact steps I need to take to accomplish writing this, and getting it checked into a new repo at
hghome/myapp
? 我需要采取什么确切的步骤来完成此操作,并将其检入
hghome/myapp
的新存储库中?
If I understand correctly you want to have an Eclipse project in a sub directory of a larger repository. 如果我理解正确,则希望在更大的存储库的子目录中有一个Eclipse项目。 I think there is no reason for you to use "subrepositores", instead you can use the single monolithic repository.
我认为没有理由使用“子存储库”,而是可以使用单个整体存储库。
<projectDescription><name>myapp</name>[...]</projectDescription>
. <projectDescription><name>myapp</name>[...]</projectDescription>
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.