Category: Notes

Migrating from SVN to Git

25.11.2010 19:03 ·  Notes  ·  git, svn

After reading manuals and smart books, I decided to migrate some of my local SVN repositories to Git. It would seem to be a simple process, but no… there were some problems.

I’m running DeepStyle 3.1 (which is basically Slackware 12.2). Git 1.6.1.3 was installed with the system.

So I created a directory for the project, ran git-svn and got a “command not found” error. The first problem turned out to be quite simple, you have to use git-svn (at least on Slackware), i.e. without the hyphen. Strange, almost all articles refer to git-svn

OK, I tried to run the correct command and got a scary error message

Can't locate Error.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i486-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/5.8.8/i486-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i486-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/vendor_perl/5.8.8/Git.pm line 93.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Git.pm line 93.
Compilation failed in require at /usr/bin/git-svn line 45.
BEGIN failed--compilation aborted at /usr/bin/git-svn line 45.

This one took a bit longer. It turned out that I needed to install additional Perl modules and the corresponding bindings for SVN. To install the modules, use the following command (internet access required):

sudo cpan Alien::SVN Error Term::ReadKey

Wait for the installation to finish. Now download subversion-bindings SlackBuild. Extract the archive, change the SVN version in the script to the one you are using and run it. Wait for it to compile and then install the package that was created. Everything should be working now.

The actual repository migration is quite simple (at least in my case). First, we need to match the usernames in SVN and Git, so we create a text file with the following content (of course, the names should be real):

jdoe = Jon Doe
tomm = Tom Morton

Then create a temporary directory for the project, initialise the Git repository, and import the sources from SVN:

mkdir project_tmp
cd project_tmp
git svn init http://svn.somehost.net/project --no-metadata
git config svn.authorsfile ~/tmp/svn_authors
git svn fetch

The --no-metadata switch in the third command is needed to ignore SVN-specific information. The fourth command creates a mapping between Subversion and Git usernames using a previously created file. The last command performs the import of the source code. The import process will take some time (depending on the size of the repository and the number of commits). Once it has finished, you can clone the temporary repository to get rid of any garbage left behind by SVN.

cd ..
git clone project_tmp project

QGIS hackfest 2010 (Wrocław) recap

16.11.2010 12:43 ·  Notes  ·  qgis, meetings

Based on the report published on the Linfiity Geo Blog and my own impressions.

The 4th QGIS hackfest, held from 11 to 15 November in Wrocław, Poland, attracted 29 participants (28 people and one dog). All participants did their best to make QGIS even better. A lot was accomplished in four days: hundreds of commits, demonstrations of new features, and many productive discussions. The meeting was organised by Paweł Netzel with the help of Milena Nowotarska, Robert Szczepanek, Maciej Sieczka and Borys Jurgiel and took place at the Department of Climatology and Atmospheric Protection of the University of Wroclaw.

My contribution — numerous improvements to the fTools plugin. When using the “Merge shapefiles to one” tool, it is now possible to select not only a folder, but also individual files. The “Simplify geometry” tool has been redesigned: I added a customisable simplification threshold and the ability to simplify the whole layer or only selected features; simplification can be done “in place” or by creating a new shapefile; “in place” simplification supports undo/redo; at the end of the simplification plugin shows a report about the total number of vertices in a layer before and after simplification.

In the following, you will find an overview of the most important topics that were discussed during the hackfest as well as most notable changes.

Plugins

One of the most heated discussions, led by Borys Jurgiel and Martin Dobias, was about plugins. We decided to review the plugin management system in particular:

Development of the new repository has already started, and Giuseppe Sucameli has modified the QGIS API to add new top-level menus (“Vector”, “Raster” and “Database”) for the corresponding plugin types.

Threading branch

Martin Dobias presented the threading branch. This branch is the result of his work during the Google Summer of Code on improving the performance of QGIS. Martin has done a lot of work to speed up layer rendering and improve the overall performance of QGIS, and has also submitted several patches to related projects, in particular GDAL.

Graphical User Interface (GUI)

Another discussion was focused on the user interface. We tried to identify places where GUI improvement or revision is needed, and fixes various inconsistencies in QGIS dialogs. One of our goals is to make QGIS usable on small screen devices such as netbooks. You can already see some of the results by downloading the nightly build or building QGIS yourself.

Globe plugin

Pirmin Kalberer presented his work on creating a 3D globe in QGIS. The globe is linked to the QGIS map canvas, so that all vector and/or raster layers displayed on the map are automatically displayed on the globe. In addition, the globe is able to create a “true 3D” when using stereo glasses.

Labelling

Marco Hugentobler has worked on improving data-defined labels. It is now possible to add fields to the layer attribute table to store the x and y coordinates of labels, and when labels are enabled, they will be placed at the given position. If labels have no associated coordinates, they will be placed automatically. The “feature” of this tool is that the labels can be moved, and the attribute table will be updated with new coordinates.

Attribute table management

Jürgen Fischer has improved attributes management. For example, when merging multiple features, you can now select values for each field of the final feature from the list of values of the original features. He has also added support for default attribute values, which is particularly useful when digitising objects.

Snapping

Cédric Mori has made the snapping options more accessible. His patch makes it possible to use snapping options dialogue as a floating panel, making it easier to access the options while digitising.

PostGIS versioninig

Horst Düster has continued to improve his plugin for versioning PostGIS databases. The plugin adds support for SVN-like functionality to PostGIS, for example allowing multiple users to edit the same table at the same time, get specific changes and resolve conflicts.

User Guide update

Anne Ghisla and Otto Dassau have done a great job updating the User Guide and describing many of the new features of the upcoming QGIS 1.6.0.

Certification

One of the discussions focused on the possibility of creating a certification programme for QGIS users. We want to create standards and a centralised certification programme so that the quality of training in Poland will be the same as the quality of training in South Africa.

Workshops

There were several workshops on QGIS plugin development for students and new community members.

Offline editing

Mathias Walker has been working on improving his “Offline Editing” plugin, which recently became part of QGIS. The plugin allows you to export layers from a PostGIS database for offline use (e.g. field data collection), edit them and then synchronise the changes with the main database.

Migration to Git

Another discussion was about using the Git version control system in the project. Pirmin Kalberer gave an interesting overview of Git and how it can be used with SVN. Perhaps some developers will now use Git, but there are no plans to change the version control system for the time being.

PostGIS plugins

There are several plugins for working with PostGIS databases, and they have partially overlapping functionality. We discussed the plans and actions needed to merge these plugins into one tool. It was also decided to create a separate menu for tools that work with databases.

GRASS

Paolo Cavallini and Giuseppe Sucameli worked on organising the list of GRASS modules and improving the user interface of the GRASS plugin.

Some photos from the hackfest.

QGIS hackfest 2010 (Wrocław)

12.11.2010 08:58 ·  Notes  ·  qgis, meetings

The 4th QGIS Developers Meeting (aka QGIS Hackfest) has started.

Online translation is available at ustream.tv. You can also chat with participants, discuss various topics by joining the #qgis IRC channel on freenode.net.

Bravo

11.11.2010 10:32 ·  Notes  ·  bravo, dance

When I was young and handsome, I used to dance. Not professionally, but quite seriously. At least, our team has been given the title of “folk”, and not so long ago it was confirmed.

I’ve uploaded some photos to Picasa, and below is one of my favourite performances. I apologise in advance for the quality: this is amateur video, and the lighting on the stage is terrible (thanks to the Palace’s sound/lighting director).

QGIS 1.5.0 "Tethys"

06.08.2010 10:30 ·  Notes  ·  qgis, release

I returned to Zaporizhzhia yesterday, sunburned and a little refreshed. The heat in Crimea is terrible, and the proximity of the sea does not help. In Choban-Kale, at 11 o’clock in the afternoon, we had 53°C in the direct sun (they say it was almost 60°C in Simeiz), and the water temperature was ~28–29°C. However, it is no better in Zaporizhzhia.

While I was on holiday, the next version of QGIS - 1.5.0 “Tethys” - was released. The official announcement is on the QGIS blog. There are many changes: a lot of bugs have been fixed, new tools have been added, and old tools have been improved (fTools, GdalTools, annotations, new georeferencing module). The documentation is actively updated.

Going on vacations

26.07.2010 15:01 ·  Notes  ·  vacation

I am leaving for Crimea tomorrow morning at 6 a.m. and will be back late in the afternoon on the 5th.

I will not have internet access there, but you can write to me :-). I promise to answer all emails, comments, bug reports and feature requests when I’m back.

Nature by Numbers

13.05.2010 14:49 ·  Notes  · 

I really liked it, cool video.

For those interested, there’s a theoretical part.

New ISP

07.05.2010 16:41 ·  Notes  ·  isp

I have been using PeopleNET as my ISP for quite some time. The speed was not very high, and the only plan available was pay-per-gigabyte. But it was more than enough for email, jabber and most websites.

There were simply no other options. Ukrtelecom cited a lack of technical capacity and offered to pay a fee and wait for the capacity to appear (they could not give an estimate of how long this would take). Beeline said they couldn’t provide service to this address, although they had connected the house next door. And there have never been any LANs in our neighbourhood, and if there were, they were very far away and not for a long time.

The Telza ISP didn’t make any excuses or problems, they just pulled the cable through a block and a half. So now I have internet like this

SpeedTest results for my new ISP
SpeedTest results for my new ISP

And PeopleNET was left as a backup and travelling option. Their USB modem fits perfectly into the small pocket of a laptop bag.

Current activities and plans

14.04.2010 13:25 ·  Notes  ·  thoughts

There has been less work lately, and I have more free time to spend on interesting and useful things.

I have resumed work on GdalTools, but the frequency and number of commits are not as high as before. Mostly small improvements and bugfixes.

From time to time, I fix bugs in my own and other people’s QGIS plugins. I also write articles and notes, not often and not very long, but still. If someone had told me 5-10 years ago that I would be writing articles, I would not have believed them. But here we are.

I’m involved in polishing and improving fTools, which is where my more or less active participation in the life of the QGIS project began: just today I submitted three more patches and picked up a few more bugs to fix.

I plan to get my hands on Ubuntu (and thus Debian) and the process of creating a LiveCD, because I want to participate in the creation of a localised (Ukrainian and Russian) version of Arramagong — LiveCD/DVD for GIS specialists.

And with the possibility that QGIS will eventually migrate from Subversion to Git, it’s a good idea to improve my skills with that version control system.

QGIS hackfest 2010 (Pisa)

15.03.2010 15:16 ·  Notes  ·  qgis, meetings

I didn’t get an Italian visa and won’t be able to attend the QGIS hackfest - bummer!

Participating via IRC is also a bit problematic: I was not allowed to go on vacation, and there is no internet at work. I’ll try to find an hour or two after work.