willowgarage/catkin-debs — pull request #17 by isucan (2012-02-07 04:55:13+00:00)
Title: update version_cmp for Issue #15

This is an updated function that addresses issue #15 in catkin_build.py
It is a bit complex, since it tries to deal with more complex cases such as 1.2.3-RC1 vs 1.2.3-RC10 vs 1.2.3RC vs 1.2.3;

Here are some output values from the new function:
```
version_cmp(1.2.4, 1.2.5) = -1
version_cmp(1.2.5, 0.2.1) = 1
version_cmp(1.2.5, 1.2.5) = 0
version_cmp(1.2.5RC, 1.2.5) = -1
version_cmp(1.2.5RC, 1.2.5RC) = 0
version_cmp(1.2.5RC1, 1.2.5RC) = -1
version_cmp(1.2.5RC1, 1.2.5RC1) = 0
version_cmp(1.2.5RC1, 1.2.5RC2) = -1
version_cmp(1.2.5RC1, 1.2.5RC10) = -1
version_cmp(1.2.5RC4a, 1.2.5RC4) = -1
version_cmp(1.2.5RC4a, 1.2.5RC4b) = 1
```