News of the migration from Mercurial to Git and GitHub has been trending in Java communities. And we are sure that between 2019 and today, every Java Developer has heard of it.
This migration came as no surprise to many top developers. Mercurial has come under criticism more than once lately. Since Java provides timely improvements for its developers, the migration was inevitable.
Project Skara was introduced to address this issue.
Project Skara was initiated to:
- Explore alternative SCM and code review options for the JDK source code
- Examine options based on Git rather than Mercurial and
- Examine options hosted by third parties.
The results from the investigation conducted via Project Skara were analyzed. After the first series of tests, the decision to use Git was clear. Two JEPs were proposed, first JEP 357: Migrate from Mercurial to Git and then JEP 369: Migrate to GitHub.
When Will Migration Happen?
This question is yet to be answered. The two JEPs have earned the status “Proposed to Target” in JDK 16. But whether the migration will coincide with the release of JDK 16 is still not confirmed. As JDK16 will be released in 2021.
The latest LTS version is probably the reason. It follows right after Java 16. The Long Term Support Release (LTS), Java 17 is due in September 2021. The chances of adding the migration to Git as the version control system (VCS) and GitHub as the hosting platform with it are very high.
JEP 357: Migrate From Mercurial To Git
This JEP proposes to move all OpenJDK source code repositories from Mercurial to Git. The complete history of all Java versions will be retained. The preparatory work is already complete, making the migration process easier. Various tools, like CLI and import/export tools are available and are open-source.
Although Mercurial is still used, its version control system now feels outdated in terms of functionality. Especially for developers who already have experience working with Git.
When you move a file in Mercurial, a copy of the original file is created first in the memory. Then it is saved in the destination. When moving a large volume of files (E.g. file transfer while developing a JDK), this would consume copious memory. What with the copy and paste activity. This is not the case in Git.
In Mercurial code review is still performed via mailing lists. This process has also become quite outdated. On the other hand, Git offers some new and improved alternatives for code review.
JEP 369: Migrate To GitHub
GitHub became the designated hosting platform according to JEP 369.
There were other options available to consider as well, such as GitLab Project. GitLab could be easily used for server-side along with Git for the client-side. But GitHub was still chosen as the platform of choice. Top software developers observed that GitHub’s performance is the same as other platforms. Or better, in some cases. But the main factor in its selection was that GitHub has one of the most extensive APIs out there.
It is also the world’s largest source-code hosting service with 50 million users as of May 2020.
GitHub also allows developers to create and review pull requests and comment on them directly using the:
- VS Code and
- Atom Editors
Commonly used IDEs like IntelliJ, Eclipse and Visual Studio tools, in particular, also provide excellent support for GitHub.
There is a variety of tools available that make working with Git and GitHub convenient. Such as GitHub Desktop, which is available via open-source as well.
Tips for Java Developers
Changes and new tools are not new for any Java Developer. Similar changes led Java coders to learn new features. Each one bringing dramatic improvements to their productivity and convenience.
One of the reasons for selecting GitHub as a hosting platform was its large number of users. This increases the probability that most Java developers have previously worked on GitHub. So the migration will not be cumbersome for them.
Those who are not yet familiar with Git and GitHub have time to prepare themselves for this change. Case in point are onsite Java Developers. They need to properly acclimatize themselves with the Git and GitHub environment. Java developers can request onsite workshops/training for GitHub.
If you are not part of any organization there are still many options available. GitHub itself has released many courses on GitHub Learning Lab for ease of its new users.
Third-party online courses also help explain the working of GitHub and Git.
The increased efficiency and new features are worth your time. Invest it in learning Git and GitHub!
It will also reduce redundancy error rate in the version control process.
Such well-planned revisions symbolize:
- Top software engineers’ efforts towards improving Java coders’ user experience.
- The reason the Java community is still thriving twenty-five years on.