This is a quick update on my mirrors of OpenJFX on BitBucket. I’ve moved some stuff around and automated it a bit. I am also retiring my “combined” repo that would merge the master, graphics, and controls scrums together. It got messy with multiple heads and bookmarks, and given the weekly merging the two scrums do wasn’t really adding any value.
Updates on Names
The first major change that I did was to move the mirrors off of my personal account onto a team account named ‘OpenJFX Mirrors’. That landing page is kind of ugly, so I created a repo to hold a wiki whose only page right now describes the current mirrors.
One advantage of the name change is that it allows for more participation. On the free bitbucket account up to 4 other people can be added in to manage things. There is also the marketing advantage of saying the BitBucket “team” is dedicated to mirroring OpenJFX, and that it is more than one of my many repos on BitBucket (I have many private repos).
There is a standard mapping of the OpenJDK repos to the BitBucket repos. Basically you change the prefix and then replaces slashes with dashes. For example this URL:
is mirrored to this URL:
It is important to note that not every OpenJFX Repo is mirrored. Right now I only mirror the Version 8 branches. Of the 2.x line I only consider 2.2.6 to be worthy of mirroring, and then since it is just bug fixes and not feature adds I consider it less interesting.
The second major change is that I have automated the update of the repos. Before I had a shell script on my MacBook Air that would do the pulling and pushing of the repo data. It was slick and easy, but it required me opening up my Macbook air once in a while. At my old job it was a more than daily occurrence. But since I am starting up new work at Fluke Networks I have more interesting things to do all day than keeping up to date on all of Reddit’s Advice Animals.
Writing this script is incredibly simple. At the core of the loop are the two real commands that get work done:
hg pull hg push
That’s all. And I am not just pushing the repo back onto itself. Mercurial comes with the concept of a default push repository. Pulls come from the default, and pushes by default go to the default push repo, or just the default repo if not set. The
.hg/hgrc file contains this mapping:
[paths] default = http://hg.openjdk.java.net/openjfx/8/controls/rt default-push = ssh://email@example.com/openjfxmirrors/openjfx-8-controls-rt
Of note is that I use the SSH mapping with a public key so the script is never asked for my user password and never knows about it to begin with.
Props to CloudBees and Atlassian
None of this would have been possible without the gracious donation of disk space and processing time from two names you should already know. Atlassian and CloudBees.
Atlassian owns and operates the BitBucket service, which hosts the Mercurial repositories that I am using to mirror. The point of this mirroring is that the UI at BitBucket is orders of magnitude better than the one you get at OpenJDK. Visualizing the changes and examining the source files is actually possible with this interface.
The automation is hosted over at CloudBees on their eponymous cloud build platform. It is awesome of them to offer free build server time to open source projects. I even have one of their technical running shirts I snagged at JavaOne this year. (And I promise it will get more use as a running shirt next year).
Give these companies some of your business, they deserve it.