I have access to an existing Mercurial repo located at merc.myorg.com/hghome. I have been asked to whip up a simple Java tool and commit it to the repo under hghome/myapp. I have never used Mercurial before, and would like to accomplish the following:
- Write the code in Eclipse
- Use the
MercurialEclipseplugin to get the sourcecode (myapp) up underhghome
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. But then I figured that I probably can't push code to a repo/sub-repo (hghome/myapp) that doesn't exist yet. 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/
src/main/java/ (Source Folder)
com.myorg.myapp (Package)
MyApp.java
build.xml
I have already installed Mercurial and the MercurialEclipse plugin. What are the exact steps I need to take to accomplish writing this, and getting it checked into a new repo at hghome/myapp?
If I understand correctly you want to have an Eclipse project in a sub directory of a larger repository. I think there is no reason for you to use "subrepositores", instead you can use the single monolithic repository.
<projectDescription><name>myapp</name>[...]</projectDescription>.