Synchronizing gvSIG CE

From gvSIG CE Wiki

Jump to: navigation, search

Note: Make sure that you have set up the Eclipse SVN Plugin as described on the page on Setting up Eclipse.

Due to the somewhat fragmented nature of gvSIG development, it will be necessary to frequently take a look at the work done in external SVN repositories, and work any useful changes in those back into gvSIG CE. This process is by no means perfect and care must be taken not to overwrite important work in gvSIG CE with files from other repositories!

Therefore, please read the information on this page thoroughly and make sure you understand the process well.

As an example, we will take a look at how to synchronize a source code modification in the OSOR mainstream SVN with the sources in gvSIG CE. This will often be necessary to keep gvSIG CE updated with the patches made by CIT-funded developers.

  • Make sure that the gvSIG SVN repository at OSOR (https://svn.forge.osor.eu/svn/gvsig-desktop) is connected to your Eclipse SVN Repositories view.
  • Right-click the "trunk" child of the OSOR SVN tree and select "Show History".

After a moment, the full log of SVN commit comments will show up in the Eclipse History console. Browsing it will give you an idea about the recent code changes committed to that SVN.

  • Note that there are some useful icons on top of the History console. Most importantly, you can retrieve older SVN entries using the "Next 25" button (>).
  • Click on the list item you are interested in. The most important information is in the fields "Comment" and "Affected paths", which tells you the intention of the change and the names of the files that have been changed.
  • Select a file entry from the Affected paths list and right-click on it, then select "Compare"

You will now see the Compare window that allows you to configure the URLs and revision numbers of the files to compare.

  • Under "Compare from" (top half of the window), leave everything as-is.
  • Under "Compare to" (bottom half), you now have to input the URL of the gvSIG CE version of the file. Since both SVNs are structured in the same way, this is simple. Just replace the leading part of the external SVN's URL, i.e. the part up to "trunk", with the same leading part of the gvSIG CE SVN.

So you replace:

 https://svn.forge.osor.eu/svn/gvsig-desktop/

With:

 https://gvsigce.svn.sourceforge.net/svnroot/gvsigce/

When that is done, make sure to tick "Compare with HEAD Revision" (under "Compare to" only!), and click "OK". After a moment, Eclipse will open a new "Compare <file name>" window in its editor view.

  • On the left, you will see the file in the OSOR SVN, on the right the one in the gvSIG CE SVN. You can navigate through all differences using the scroll bars or the helpful navigation icons on top of the

comparison view.

  • If you are satisfied that all changes in the OSOR SVN are OK and that there are no other differences with the gvSIG CE file, then you can right-click the OSOR entry under "Affected paths" and choose "Export". This will allow you to overwrite your local copy of the file with the version in OSOR (note that nothing will be touched if the two versions are identical). You should then test the new version and commit it back to the gvSIG CE SVN.
  • If there are significant differences between the two versions, then you must manually copy and paste only the wanted changes from the OSOR version of the file.

When committing synchronized changes from an external SVN, please make sure to include some reference to the SVN and the original SVN commit number in the comments. This will allow others to later track which changes have already been worked into gvSIG CE. E.g., a comment could be:

 Synchronizing commit #33199 from https://svn.forge.osor.eu/svn/gvsig-desktop/