JDK 9 Sandbox Development Forest

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Tue Dec 16 12:19:50 UTC 2014


On 12/16/2014 11:51 AM, Chris Hegarty wrote:
> On 16 Dec 2014, at 03:01, Wang Weijun <weijun.wang at oracle.com> wrote:
>
>>
>>> On Dec 16, 2014, at 03:38, Chris Hegarty <chris.hegarty at oracle.com> wrote:
>>>
>>> Please read the following common questions and guidance before using the sandbox.
>>> http://cr.openjdk.java.net/~chegar/docs/sandbox.html
>>
>> I normally only work on one repo. Is there a guideline on using the simple commit and push commands without calling hgforest.sh?
>
> You can use just a single repo, and the commands are the same, s/sh common\/bin\/hgforest.sh/hg/. But,
>
>   1) your branch name is not guaranteed to available in other repos if/when you need it,
>
>   2) your branch will not have a consistent view of the forest.
>
>       Other repos, using the default branch, will continue to be updated
>       with changes from jdk9/dev, which may cause build failures
>       as your branch will have to be manually synced with the
>       default branch.
>
>> Is mq friendly with branch?
>
> I have not experimented too much with queues on branches, but it appears to push and pop simple patches fine for me. Of course, you need to 'qpop -a' before updating between branches otherwise it gets confused, but then this is no different from a normal 'hg update -r’, without branches.

MQ is agnostic to branches - it's up to the user to qpush on the correct 
branch.

Also, you can use `hg rebase` after updating instead of `hg qpop -a` 
before updating. It will 'rebase' the 'qbase' changeset on top of the 
branch tip. When there is a conflict you will need to perform the merge 
manually and refresh the patch.

>
>> Is it easy to push anything to the default branch if I am mostly working on my own branch? Also, is there a server-side hook that rejects such pushes?
>
> There is no hook preventing pushes to the default branch. Please be careful.

There is a workaround. In your <repo>/.hg/hgrc you can specify 'defaults'

```
[defaults]
push = -b <feature_branch>
outgoing = -b <feature_branch>
```

After this the `hg push` and `hg outgoing` will have the '-b' option 
appended, effectively allowing you to work on the <feature_branch> only.

-JB-

>
> If this becomes an issue over time, then we can look at the possibility of adding such a hook. I would like to get some experience with using branches and see how it goes before deciding if this is necessary.
>
> -Chris.
>
>> Thanks
>> Max
>>
>



More information about the jdk9-dev mailing list