Sunday, October 4, 2015

gpxpy 1.0

It's long overdue, but the 1.0 version of my python library for parsing/manipulation of GPX files (gpxpy) is out. It contains too many changes to list them here, but it can be summarised as: gpxpy now supports both GPX 1.0 and 1.1. formats.

The 0.* version started as a utility scripts for me, it supported only some fields GPX 1.0 and I was adding more as users requested. But with time, as GPX 1.1 started to be used more, it became difficult to follow what's exactly missing in the library. People requested featured from different versions of GPX but the library nominally supported only 1.0.

After a couple of months of complete refactoring of the code to parse/serialize GPX file the new version is out. There is only one thing missing -- support for GPX 1.1. extensions. This will (probably) come later.

Thursday, July 9, 2015

git plus

Just released: Git plus is my utility "plugin" for git. It consists of:
  • git multi a utility to execute a git command on multiple git repository
  • git relation to show the relation between two branches/commits
  • git old-branches to detect old/unused branches
  • git recent to list recently used or last-used branches
If you are using OSX and brew, it's available there, too.

Monday, March 2, 2015

git relation

Two different branches in a git repository can be related in one of the following two ways:
  1. Branch A is ahead of branch B
  2. Branch A and branch B diverged.
But, I always wondered how to get more information about that relationship. For example, if A is ahead of B -- by how many commits? Or if they diverged -- how many commits ago (from A, and from B). And what exactly commits are those?

So, I just wrote a simple python script which will find the response.


$ git relation master test-branch
master is AHEAD of test-branch

Commits from test-branch to master:
  2176e45 Tomo Krajina git-multi in README, 18 hours ago
  50b2f79 Tomo Krajina + README, 18 hours ago

$ git relation branch-1 branch-2
branch-1 and branch-2 DIVERGED, common point is 7e0bb439dd2aef4ff0262afec0a98461489becae

Commits from 7e0bb439dd2aef4ff0262afec0a98461489becae to branch-1:
  3d0246b Tomo Krajina js namespace, 3 weeks ago
  60215aa Tomo Krajina Merge branch 'new-path-editor' into new-path-editor--js-namespace, 3 weeks ago
  1e76deb Tomo Krajina js namespace, 5 weeks ago

Commits from 7e0bb439dd2aef4ff0262afec0a98461489becae to branch-2:
  359eff6 Tomo Krajina form event functions, 5 hours ago
  a99b5f8 Tomo Krajina ..., 3 weeks ago
  1d3b97c Tomo Krajina Preparations for marker handler, 3 weeks ago
  9546769 Tomo Krajina Removed all subscription stuff, 3 months ago
Git relation is part of my git-plus repository:

Thursday, January 15, 2015

My git book

I think my git book in Croatian (LaTeX source here) can be now considered "finished". It started from a short document with the most basic git commands to help friends moving to git (from SVN and TFS). But as they kept asking me questions I was adding more and more content to the document. After a few months it had more than 60 pages of text, so I decided to make it a real book. It is now more than 150 pages, and it is (AFAIK) the only git introduction book in Croatian (and Bosnian and Serbian, since our languages are more like dialects than real languages).

The book is open source (Creative Commons Attribution-ShareAlike 3.0), and after more than 3 years from the initial commit more than 20 people helped me with patches and suggestions. Thank you all!