2008-11-03

Branching and Merging in Subversion

Subversion (and Subclipse as my current UI to it) has a somehow tricky branching and merging technique, I've tried it for some time and the only way I managed to do it is by:

  1. The main trunk is branched using Team -> Branch/Tag (this initiates a Commit which is recorded in context to the branch, not in the main trunk; you can get its revision number by showing the history of the project linking to the branch or the main repository in the SVN Repositories view, but not the project linking to the trunk)

  2. You can select to switch to the branch in the same project, or keep this project linked to the trunk and checkout another project linking to the new branch
  3. Edits can be done independently from both the trunk and the branch where the commits don't conflict (as they are in fact different files)
  4. When you need to incorporate a change that has been done in the trunk but not in the branch (like a bug fix or to keep the branch up with the trunk), the Merge command can be used:
    • Select the project containing the branch
    • Select Team -> Merge
    • In the "From" group, press the select button beside the revision number
    • In the available revisions select the revision you branched at (the Commit of the branching order)
    • In the "From" group, press the Select button beside the URL text box
    • Select the trunk folder
    • In the "To" group, check "Merge to HEAD revision" to incorporate all the changes done in the branch, from its creation to the current most up-to-date revision
    • This will create a modified working set locally (the project linked to the branch will need to be committed)
    • At this stage, you need to update the project first (using Team -> Update) before the modified files can be committed
    • Finally, select Team -> Commit to publish the merged files into the branch
  5. In the reverse direction, when you need to merge back changes from the branch into the trunk (where edits has been done in both the branch and the trunk), all you need to do is to select the project containing the trunk and select the branch as your "From" URL, you still need to select the revision number of the Branching commit (for all the changes you committed to the branch to be included and not just the newer or latest ones)  

I find a special shortcoming in the Subversion branching and merging system; when merging, it doesn't merge the changes in its revision number, meaning that if you did changes to the branched files in revisions 105,106,107 & 108 to the branch, and then merged and committed the changes to the trunk in revision 109, you will only see all of the changes suddenly occur to the file in revision 109 and later, not in an incremental way as it should be.

This is not a major shortcoming, as you can always return to the branch and check its changes in the revisions it was committed in, but it is still an unintuitive solution.

Experiments with Subversion

I've been experimenting with Subversion, and it turned out to be great tool, even for single developers, where its ability to indefinitely remember changes and track versions is indispensable to any software project that is more than a small hack.

Also the ability to work with it is very important to contribute to any major open source software (especially the ones I'm currently interested in as uDig, PostGIS and OpenLayers).

I'm using Subclipse and TortoiseSVN to handle the communication from and to my SVN repository, Subclipse is particularly easy and handles all of my needed functions with tight integration to the Eclipse platform; I've tried the Subversive and it didn't seem to recognize the SVN connector library (neither JavaHL nor SVNKit), I think the Subversive plug-in is more feature-rich, but until further attempt, Subclipse is very stable to me.

I've also read about Git, Mercurial and Bazaar, and I think the Distributed Version Controlling Systems are really interesting, but they seem to not fit so well with my development model, you can check about some notes about them here and here.

2008-10-17

uDig 1.1.0 released

uDig 1.1.0 is released according to uDig and How 2 Map blogs, I find this application very interesting, as it holds a great potential in becoming the #1 GIS desktop application in the Open Source arena, because I think it is the most user friendly interface and bacause of its programability.

2008-10-09

AMD is splitted

It seems that the city of Abu Dhabi is investing in AMD through its new split-off company "The Foundry Company"

http://www.pcmag.com/article2/0,2817,2331941,00.asp

2008-10-08

روح .... عفونا عنك

بص يا حبيبي .... أنا قرصت علي ودنك خفيف كده .... إنما وحياة #### لو كررت الهمبكة بتاعتك دي لأرميك جنب أيمن نور ... و أمنع عنك حتي الدوا لما أخليك تقول حقي برقابتي ..... و لا أطلعك و لا أطلعوا.


2008-09-30

Adobe Creative Suite 4 Launched

On September 22nd, Adobe has officially released its forth version of Adobe Creative Suite.

You can watch the 1 hour launch event

2008-09-29

دول طلعوا شهرين

أنا ماكنتش متصور إن الموضوع هيطلع كده .... الراجل لبس شهرين بس ..... طب هايتفاخر إزاي بالحبس في شهرين دول.




علي العموم يا كبير السجن للجدعان ... الجدعان بجد

2008-09-17

أنا اللي أخذت سنة في الريس

مش من زمان أوي ... كان لما تييجي تقابل شاب صايع أو بلطجي ... كنت تلاقيه متفاخر أوي بموضوع إنه أخذ ست شهور جنحة في اللي كح في وشه .... و لا إعترض يوم على طريقه نظره لمرات أخينا، بس الموضوع ده إنخفض شوية بعد مابقا إن السجن مش للجدعان إنما السجن للمصريين جميعاً (و ده توحيد إجتماعي يشكر عليه اسيادنا في الداخلية)

المهم ظهرت بارقة جديدة من الأمل لإحياء هذا التراث المصري بس لنوعية جديدة من المصريين، بقت فيه جريمة جديدة إسمها إهانة رئيس الجمهورية و هي المرادف اللغوي للعيب في الذات الملكية (في الزمن جمهوري الإسم ديكتاتوري المعني ده) و أعتقد إن عقوبتها سنة.

أنا كنت بتابع أخر أخبار قضية إبراهيم عيسي و هوا بيحاول يخرج من التهمة العجب إللي هما ملزقنهاله (و إللي هيا أصلاً كانت أمل .. مش خبر ... يعني بزمتك مش كل واحد كان نفسه الإشاعة إللي هما بيتكلموا عنها تبقي حقيقة؟ و نخلص بقا)

المهم ..... بعد إبراهيم عيسي ماهاينطس السنة المتينة بعد كل المحاميين و الجلسات هاتلاقية في كل الجرايد و المقالات بتاعته بيتفاخر بأنه أول  من أخذ في الريس سنة.... و بأن الوطنية لا تكتمل إلا لما تأخذ في الريس سنة!!!!

والله يعني أنا بشكر سيادة الرئيس و السادة القائمين علي القوانين و الأحكام إللي قدروا يرجعوا للتراث المصري عادة مصرية أصيلة.

2008-09-04

The Eclipse RCP - 3 - Launching configuration

A Launch configuration in Eclipse defines the environment under which your application will be started, e.g. compiler flag, plug-in (classpath) dependencies etc.
Select your plugin.xml -> Run As -> Run Configurations
On the tab Arguments you should add the parameter -consoleLog. This will send error message of your Eclipse RCP application to your Eclipse development IDE.
On the Arguments tab, you will find also the -os -ws -arch -nl arguments associated with ${target} variables, they can be edited form Window -> Preferences -> Plug-in Development -> Target Platform
On the Plug-ins Tab select "Validate plug-ins prior to launching". This will check if you have all required plug-ins in your launch configuration.

The Eclipse RCP - 2 - Create your first RCP application

  1. Download the package "Eclipse for RCP/Plug-in Developers" from the webpage of eclipse (www.eclipse.org).
  2. Extract, and Run.
  3. In Eclipse select File -> New Project.
  4. From the list select Plug-In Project.
  5. Give your RCP plug-in a name, "MyFirstRCP", click Next
  6. Select "Yes" at the question "Would you like to create a rich client application", click Next
  7. Select "RCP application with a view", as a template, click Next
  8. Type the name of the Title Bar in the "Application window title" field, and Select "Add branding", click Finish
To Launch the application, double-click on the file "MANIFEST.MF". You should see an editor and the tab "Overview" should be selected. Click the link "Launch an Eclipse Application".