The submit repo allows committers to submit a change for automatic build and test. This allows non-Oracle committers to build and test on the platforms supported by Oracle.
Basic Operation
The submit repo is modeled after JDK sandbox repo. The default branch of the submit repo is automatically sync'd with its upstream repo. When a branch is updated in the submit repo, it is automatically run through a predefined set of builds and tests. Once the build and test is done, a status email is sent to the committer.
A Simple Example
The example below, uses the defpath.py Mercurial extension. This extension is available from the Code Tools project.
Say you need to make a simple fix to the hotspot README file in order to fix bug JDK-7000001. The following would do it:
$ hg clone --branch default http://hg.openjdk.java.net/jdk/submit $ cd hs-submit $ hg defpath -du <OpenJDK id> $ hg branch "JDK-7000001" $ echo "Make the README longer." >> README $ hg commit $ hg push --new-branch
FAQ
What should I call my branch?
Only branches starting with “JDK-“ will be built and tested, name your branch with the JBS id of your fix/enhancement.
How should I create a branch?
Create a branch in each repository that you need to change. For example, if your fix requires changes in both the jdk and hotspot repos, you could do this:
$ hg branch "JDK-7000001"
Branches without code changes will not be picked up and built.
How do I update my branch with the latest upstream changes?
Before you push a branch to the submit repo, you should merge in the latest upstream changes onto your branch.
$ hg pull # make sure the default branch has latest changes $ hg update "JDK-7000001" # make sure you are sitting on your branch $ hg merge default $ hg commit
How should I push a branch?
The first time you push a new branch to the submit repo, you need to use the "--new-branch" option like this:
$ hg push --new-branch
Subsequent pushes to your branch in the submit repo do not need the "--new-branch" option.
If your local repo has several fixes under development and you're ready to push only one, you can do that with the "--branch" option:
$ hg push --branch "JDK-4040458" --new-branch
What happens when I push my changes?
When changes are pushed to a branch in the submit repo, a job is created on an internal Oracle system to build and test those changes. A job usually takes a couple of hours to complete. When your job is finished you will get an email describing what happened. If there are failures reported in the email, contact an Oracle engineer, providing the ID/URL in your email message. The Oracle engineer will be able to access internal logs and help you resolve the problem.
How are changes from upstream brought into the submit repo?
Changes from the default branch of the JDK repo is pulled into the submit repo automatically.
Should I close my branch?
Once you no longer have any need for the branch, you should close it. Do the following:
$ hg update -C "JDK-7000001" $ hg commit --close-branch -m "Closing branch" $ # Update repo to another branch to avoid mistakenly re-opening the closed branch. $ hg update default
How can I show all changes for my branch?
To see all the changes for a branch named "JDK-4040458" you can do this:
$ hg log --branch "JDK-4040458"
How do I report problems?
If you have problems with submit repo, please send mail to ops@openjdk.java.net