EGit Synchronize View Workflow Updates

One part of my Google Summer of Code project is to improve EGit Synchronization workflow and make it easier for new user to understood how it works.

So almost two weeks ago I’ve write a post with proposed new workflow for Synchronize Wizard. The main idea of that post was to initialize discussion with community how they want to use this wizard. According to Google Analytics this post was displayed around 120 times with isn’t that bad I think … but only one person leave a comment on it with isn’t a good result. Maybe I’m doing something wrong or I’m not making myself clear enough. Or maybe this topic isn’t so important for other people … I don’t know, maybe you can help me and give me some hints?

Apart from this, here is another part of changes that are proposed to be done in Synchronize workflow. Most of them are waiting for comments and approval in gerrit. This a good moment for comments and share thoughts about current implementation, before it will be merged into master branch. Additionally I’ve opened two bugs for discussion on Synchronize Wizard and Team menu based workflows:

  • 344891 – for Team context menu
  • 344888 – for sync-wizard

I’m understood that you don’t want to play with our code base and struggle with project setup only to check one of two new features, so here is a short description of my ideas and some screenshots:

  1. Always use current selected branch (HEAD) as source of synchronization
    As you may know currently the synchronization-dialog (this is a dialog that pops up after you select Team > Synchronize… from project’s context menu) allows select source and destination branch, and after that you can launch the synchronization action.When I was implementing this feature I had in mind git diff command, where you can easily compare two given points in repository history. But this command produces a patch-like output. You cannot move changes around, the only action that you can do with it is to only review it. In case of Synchronize View we use to use it to move changes around and prepare commit. So it is more then simple git diff.

    Another huge issue with this approach is that handling Synchronize View context menu actions like ‘Commit‘, ‘Merge‘, ‘Overwrite and Update‘ gets really complicated when base branch isn’t actual working branch.

    Because of that I’ve decided that in new workflow you need to select only a destination branch! For now I think that I’ll not remove this functionality from EGit code, because maybe in feature we’ll found a use case when comparing two given branches without switching on one of them could be use full.

  2. Always fetch changes before synchronization
    I’ve spotted that new git users that comes from CVS or SVN doesn’t really get the idea of ‘fetching changes locally’. They launch synchronization and want to see incoming changes without fetching them into repository. This feature could be also useful for old git users, because it will save couple of mouse clicks ;)The implementation that I’ve proposed don’t launch fetch action all the time. It checks does current branch tracks any remote branch, if yes it fetches changes from that remote, otherwise it will not do anything.

    OK, but what when I’m off-line and I’m working on branch that tracks origin/master, I would be forced to wait until connection timeout occurs?

    Well … it depends 😉 Every time fetch fails you will be informed by dialog that you can disable automatic-fetch in Team > Git preferences. So in the worst case you will wait only once for connection timeout, then you will be informed that you can disable auto-fetch.

  3. New Synchronize Wizard
    After discussion in bug 344888 I’ve decided to abandon changes that I’ve presented two weeks ago. And implement it this way:EGit Synchronize Wizard

    As you can see there is only destination branch. Also all project names have decorations that describes repository name and current branch name. There i a single button for include local changes and that’s all, no more pages and logic’s.

    Additionally, the Destination branch list will contain also additional refs like FETCH_HEAD

  4. New context menu option ‘Synchronize Workspace’

    EGit Synchronize Workspace

    This a short cut for comparing HEAD against HEAD with included locally made changes. It is useful when you want to see what changes you made in workspace before you commit them. I think that this is a most use case for synchronize view therefore I’ve decided to add this shortcut.

  5. No more Synchronize-dialog
    This a Matthias Sohn idea to replace synchronize-dialog with dynamically build sub menu entry (same as in ‘Switch To‘ action).

    EGit Synchronize... Sum Menu

    This sub menu will contain 20 elements at most. They are alphabetically ordered and include local and remote branches, tags and additional refs like FETCH_HEAD. You don’t find here HEAD and name of current selected branch, because for synchronizing against those is ‘Synchronize Workspace‘ action. If you don’t see branch or tag that you would like to synchronize against, you need to choose ‘Custom…‘ option. After that the Synchronize Wizard will be shown where you can choose destination from complete list of branches, tags and additional refs.

  6. Push and Pull actions in Synchronize View toolbar
     

    EGit SynchronizeView Push and Pull Toolbat Actions

    This change is merged into current master, so if you want to check out that you need to install a nightly build of EGit.

    There is only one limitation for push action, it works only when you are synchronizing one repository. It would be disabled when you synchronizing more then one repo.

It is all for now. Any ideas and comments are welcome (and needed ;))!.

New synchronize wizard for EGit

Here are some screenshots of new redesigned steps in EGit synchronization wizard. The main idea is to make most common synchronization usage as short as it is possible. So I come with idea of ‘predefined synchronization configurations’. In first step of sync-wizard you can select from three options:

  • Working Tree
  • Remote Tracking
  • Custom

EGit new synchronization wizard - page 1

After selecting first option you only uncommitted local changes (those that are stager/in index and those that aren’t). This should help you when you want to review yours changes just before commit or stage some changes.

Second option ‘Remote Tracking’ is only available when current branch tracks one of yours remote branches (if it doesn’t this option is disabled). This option will show you all locally made changes (same as in ‘Working Tree’) but also changes made in commits that occurs in local and remote branch after you started the local one.

Selecting one of those two actions (and selecting the checkbox next to repository name) will enable the ‘Finish’ button and you are done with launching synchronization.

In case when at least in one repository the ‘Custom’ option is selected, the ‘Finish’ button will be disabled, but ‘Next >’ should be enabled. In this situation you must go to the next page to setup yours custom synchronization.

On ‘custom synchronization step’ you will only see repositories that was chosen to have a custom synchronization. Here you can select source and destination branch and also include or exclude local changes from being shown in synchronization results.

EGit new synchronization wizard - page 2

Those changes are currently pending for a review in ours gerrit, but I think that they will be merged into master branch (not they won’t be included in 0.12 release).

What do you think about such approach for git synchronization? Maybe you see some other ‘predefined’ day-to-day synchronization configuration, if yes please let me know!

Google announces list of accepted projects in GSoC11

Google Summer of Code 2011

Almost 24 hours ago Google announces list of accepted projects in this year edition of Google Summer of Code program. In current edition Eclipse Foundation got 17 slots (as you may know from Wayne post). One of this slots was allocated for me (as a student) and Matthias Sohn, the project that we’ll be working is a continuation of my last year work for EGit project. The project name is “EGit Synchronize View support part 2”, if somebody is curious what this project is about you can check it on melange’s (I’ve made it public). In this proposal I want to address most important missing features in current implementation of EGit Synchronization support. If you think that something there is missing pleas let me know via mail or comments!

Apart from that I’m third time GSoC student (and that Eclipse got 17 slots!) there is another good news for me … on the list of accepted proposals in Eclipse Foundation there is 6 (six!) student’s names that looks like there are from Poland! Yeah! 1/3 of Eclipse GSoC students seams to be from Poland, this is really great information! Next great thing is that four projects are mentored by Polish mentors! Great work guys! And good luck 😉

And last but not least, as far as I know there is one other student from my university that was accepted in GSoC11. This is some kind of regression comparing to 2010 edition where there were three accepted students. Maybe in next edition this will be improved, we’ll see.

After announcement the “community bonding” time begins … but not for me since I’m quite well integrated with EGit community 😉 therefore for me the “coding period” starts today ;>

2.6.38.4 -ck3 + bfs401

I’ve recently move from vanilla kernel to -ck kernel flavor.  What is -ck ? This is set of patches by Con Kolivas that improves desktop performance. By default -ck patches includes Brain Fuck Scheduler (bfs also by Con Kolivas); this scheduler is designed to improve system interactivity and responsiveness in small system, where “small” means less then 16 cpu’s/cores/threads.

Few days ago the new version of vanilla kernel (2.6.38.4) was released, two or three days before the new version of bfs (401) was also released. Unfortunately -ck patches didn’t get an update, so I’ve decided to play a little bit with it.

First of all I’ve spotted that -ck apples bfs as a first patch, so second step wast to find out where bfs patch ends … this was a really easy task. With this knowledge I could easily extract old version of bfs from -ck3. Then both patches can be contacted and applied on vanilla 2.6.38.4. First compilation shows that function above_background_load was removed from bfs401, fortunately it was used only once 😉

I’m using this kernel (2.6.38.4-ck3-bfs401) for two days without any problems so it seams that my combination of those patches doesn’t brake anything. If you want to try this on your own, here is 2.6.38.4-ck3-bfs401.patch

Szczecin JUG meetup – Google Guice

plakat
I’m honored to invite every one of you to next meetup of Szczecin Java User Group. This time Kazik ‘morisil’ Pogoda will be speaking about Dependency Injection library form Google called Guice. Before getting deep into Guice he’ll explain what exactly DI is. Then we’ll dive into Guice based example application.

This is a first from a series of lectures about Dependency Injection in java by Kazik. The next one will cover Gin, dependency injection library for GWT based on Guice.

If you are interested in those topics feel free to join us 28th of April (more detailed information about time and place you can find on poster above).