GSoC2010 accepted proposal for Eclipse Foundation

April 18th, 2011

Abstract

Git is a great distributed revision control system and, thanks to EGit and JGit developers, Eclipse has quite high quality support for Git right now. The goal of this project is to improve EGit functionality by integrating it with “Synchronize view” (which is one of the best features in Eclipse CVS plugin). The second part of the project would be adding ‘git stash’ support for JGit and UI for it into EGit. Implementing both these features would make Git support in Eclipse closer to “CVS quality”

Detailed Information

Nowadays, software engineering can’t exist without revision control systems. Any larger project has its own repository where developers exchange their changes. Even if somebody works on a project on his own, he keep its sources in version control systems, because keeping sources in a version control system is beneficial. Good integration of version control systems with used IDE is a huge advantage of that particular IDE. Eclipse always had high quality support for CVS. That support, in my opinion, sets standards of good VCS integration right now.

Git is one of the modern DVCS (distributed version control system); it is fast and effective, with lots of features and new solutions for version control systems. Right now, Eclipse has base support for Git ‘repositories’. Using EGit plug-in user interface developer can:

  • commit changes
  • create branches
  • switch between branches
  • fetch and push changes
  • create and apply patches
  • compare a single file with a local ‘repository’

One of disadvantage of the current plug-in version is the disability to review the current project status against local and remote repositories. Developer cannot review incoming and outgoing changes. He can only compare one file with the current local repository status. Compared to Eclipse CVS support, this is quite annoying.

The first goal of this project is to integrate EGit plug-in with “Synchronize view” which is the default Eclipse view to show incoming and outgoing changes. Using this view, developer can clearly see changed files and compare them to the current repository status.

When talking about Git repositories, we must consider two situations: one, when we want to review the current state against the local repository and second, when we want to review the current state against the remote repository.

In case of the local repository synchronization, we will always have to deal with staged and unstaged changes. In Git terminology ‘staged change’ describes change that will be part of next commit. Using this view developer can easily add and remove changes from commit (this is equivalent with ‘git add’ and ‘git rm –cached’ command line actions). Beside that, there will be also possible review changes in particular file in ‘Compare view’ that will gave us better overview on what changes will be included in commit.

Current implementation of Eclipse Team Framework doesn’t contains UI that could be used in ‘local repository synchronization’. That meas that is should be written from scratch or added as a extension to existing Team Framework.

Synchronizing with remote repository is more complicated task. First of all there should be a dialog or wizard that would gave possibility of adding (editing and removing) remote repositories. Secondly before synchronizing with particular repository developer should choose one repository from existing list, then select one branch from remote branches list. Then we can fire synchronize action with would be equivalent to calling sequence ‘git fetch <repository> refs/<branch path>’, ‘git diff HEAD..FETCH_HEAD’ from the command line.

To achieve this goal, it is necessary to add a new class e.g. SynchronizeView that would extend org.eclipse.ui.part.ViewPart to EGit and add an additional configuration in plugin.xml file for the perspective extension as well as SychronizeAction that would extend org.eclipse.team.internal.ui.actions.TeamAction. Additionally, implementing integration with “Synchronize View”.

As for the second part of my Summer of Code project, I want to add stashing support to JGit. Stash is a useful feature of Git that gives the ability to “hide” changes for a certain period of time and bring the current branch back to the previous state. Then, we can take our “hidden” changes back from the stash. It is an indispensable tool when we start working on some new features and, all of a sudden, we must switch back to the previous repository state to fix a bug. Right now, there is no support for stashing in JGit and EGit so I’ll start from implementing stash support in JGit and then move to implementing a user interface for it in Egit.

Second goal is very much connected with the low-level Git programming. In my humble opinion, it requires a lot of knowledge about JGit and Git architecture. It would be perfect if I could get some support from JGit committers.

The biggest benefit from this project for the whole Eclipse community would be the improved Git support. Eclipse is famous for their CVS integration, now it is time to move on and get the best Git integration that is possible. Some time ago, Eclipse Foundation published source code of their projects simultaneously in CVS and Git repositories and it would be prefect if the developers from Eclipse community could use Git repositories from Eclipse UI without any third party software. Providing that kind of support level is the number one goal of EGit and JGit projects.

Background

During Community Bounding Period, I’m planning to add a user interface for tagging in EGit, as a warm-up, before the main project starts. This would give me an insight into both projects’ (EGit and JGit) source code. I have already started working on that mini-project. Also, I’ve sent a proof of concept patch to Gerrit code review. Recently, I’ve started reviewing source code of org.eclispe.team and org.eclipse.team.cvs projects and I’ll continue doing it during the Community Bounding Period. I’ve also been planning to learn more about Git and how it works on the lowest level. To achieve better results, I might need a person that would show me where to start my research and to what I should pay special attention.

Deliverables:

  • Source code of Java classes (with java-doc comments) for both features
  • JUnit test’s test for both features (SWTBot test’s for first goal)
  • User guides for “EGit Synchronization View” and “EGit Stashing”

Schedule:

  • May 15 – EGit tagging UI
  • June 22 – EGit Synchronization View support
  • July 27 – JGit stashing support
  • August 16 – EGit stashing support

Expectations

I think that I would mostly need help with low-level Git during implementation of stashing support for JGit. I’ll also need some help (or hints) during integrating EGit with current Eclipse Team Support API from someone that is familiar with Eclipse Team Framework and EGit as well.

Contact Information

My name is Dariusz Łuksza and I am 24 years-old, and you can email me at dariusz<dot>luksza <at> gmail.com. I am studying Computer Science at the Western Pomerania University of Technology (Szczecin, Poland). I have been interested in computer programming for nine years now. At the age of 15, I started studying Turbo Pascal on my own, then moved to Perl, PHP, C/C++ and Java. Right now, I have three years of experience as a Java Developer. Most of that time, I’ve been working with Google Web Toolkit but I’ve also worked with Spring, JMX and Jira plugins. I’ve successfully finished last year’s Google Summer of Code edition for Apache Software Foundation (I implemented JMX monitoring support in Cocoon 3).

Personally, I have been using Eclipse since I’ve started learning Java and I think that this is the best IDE for Java developers. A couple months ago, I started using EGit plug-in. Recently, I’ve sent three patches for review for EGit project. I’ve already mentioned one of them above (proof of concept for tagging support) the other two concern branching dialog usability and code readability improvements in GitProjectData class.

Additionally, I’ve been using Linux and Open Source software for seven years. I’m sure that I have the knowledge and skills required to accomplish this GSoC project. It would be great honor for me to participate as a GSoC student in Eclipse Foundation and contributing EGit and JGit projects.

Comments are closed.