Apache

From APIDesign

Revision as of 15:41, 13 January 2017 by JaroslavTulach (Talk | contribs)
Jump to: navigation, search

In autumn 2016 Oracle announced that it wants to donate NetBeans to Apache foundation. It is January 2017 and we are still donating. Right now there is a review of NetBeans sources in progress. Some repositories are reviewed (for example html4j Mercurial repository) and a branch donation_review has been created there. The process isn't fast, but we are getting in there.

Conversion to Git

Apache is using Git and that means we shall convert our Hg repositories to Git ones. Luckily, this is where the power of community shows! Emilian Bold, long time NetBeans community member, decided to do such conversion. As such we have 1:1 mapping between NetBeans Releases Repository and its Git version. Thanks Emilian! As the review isn't finished yet, and we are still using the Hg repository for daily development - Emilian synchronizes the repositories daily. All seems to work.

Emilian was so kind that he also converted the Html4Java Hg repository html4j to Git one. His work was so excellent that I decided to close all development in the old Hg repository and move it to Git. As such all changes for Html4Java are now happening at [1] - until we find more suitable place.

NetBeans Git Repositories at Apache

Will all these repositories be hosted by Apache? I don't know, but I doubt. The Oracle review of the code reveals some problems (for example here) and they need to be fixed. Oracle can then donate only the fixed code - e.g. not with the whole history.

However having source code without history is the best way to kill a project. We have to have the history. We have to have to do git blame and get reasonable results, otherwise the project becomes unmaintainable. Will Apache take the Emilian Git repositories? With the history? Or will Apache insist on starting from scratch? I am afraid, the latter is closer to reality.

Thus we have useful Git repositories by Emilian that we want to use for our work and official repositories hosted at Apache. Of course one can have both repositories next to each other locally and work in one and commit to the other, but such work requires significant doublethink and will be errorprone.

Trimming the Git History

Just before last Christmas break I decided to tackle the problem. Git is known to support shallow copies: ```git clone --depth=1 url``` - could we make such shallow copy and host that at Apache while keeping the deep copy with all history (as created by Emilian) and use it for day to day development? Can changesets created on top of the shallow copy be easily pulled to deep copy and vice versa?

Short answer: No.

Git has some security features that prevent one to put shallow copy of ```depth=1``` into an empty repository. But I hadn't given up and found small hint: looks like Git's ```replace``` command could do the trick.

Personal tools
buy