...
Table of Contents | ||||
---|---|---|---|---|
|
...
A simple example
Say you need to make a simple fix to the README file at the head root of the hotspot repository to fix bug JDK-7000001. The following would do it:
Code Block | ||
---|---|---|
| ||
$ hg tclone --branch default http://hg.openjdk.java.net/jdk9/hs-submit
$ cd hs-submit/hotspot
$ hg branch "JDK-7000001"
$ echo "Make the README longer." >> README
$ hg commit -l msg.txt
$ # Get your code review here
$ hg push --new-branch |
...
We recommend you name your branch with the bug id of your fix. Since Mercurial branch names can't begin with a number, use the full bug id, like "JDK-4040458"
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:
Code Block | ||
---|---|---|
| ||
$ #From the root of your local forest
$ hg -R hotspot branch "JDK-7000001"
$ hg -R jdk branch "JDK-7000001" |
You can commit the empty branches immediately after they're created or wait until you have made code changes. Unlike the recommendation for the OpenJDK Sandbox forest, you should not commit an empty branch in a repository that will not eventually have code changes. This will cause your fix to fail when it is merged with the upstream forest. This restriction will be removed in the future.\[ Should we recommend the empty changeset for every tree like they do in the sandbox forest? What happens to our automation if empty changesets are pushed?\]
How should I push a branch?
...