COIN-OR::LEMON - Graph Library

Opened 16 years ago

Closed 15 years ago

#144 closed task (fixed)

Fix versioning of code in the repository

Reported by: Akos Ladanyi Owned by: Alpar Juttner
Priority: major Milestone: LEMON 1.0 release
Component: build system Version: hg main
Keywords: Cc:
Revision id:

Description

Currently we use the mercurial revision hash as the version string. Since this can start with letters it can happen that it is considered smaller than any other version starting with a numerical character.

Solution 1: Use '99-hash' as the version string (hash is the revision hash).

Solution 2: Use a real version number. This should be chosen to be greater than the version number of the latest stable release, but smaller than the version of the next one. (This is what other projects do, for example gtk+: http://svn.gnome.org/viewvc/gtk%2B/trunk/configure.in?view=markup)

Solution 3: Use Solution 2 but append the revision hash to the version string.

What should we do?

Attachments (2)

e63a95b68827.patch (1.4 KB) - added by Alpar Juttner 16 years ago.
5d12d5c80ac9.patch (1.1 KB) - added by Alpar Juttner 16 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 in reply to:  description Changed 16 years ago by Alpar Juttner

Replying to ladanyi:

I think it's important that the hash revision id is a part of the version name of an unreleased version.

Is for example version 1.0-362415050b29 considered to be between 1.0 and 1.0.1 by autoconf? If yes, then this kind of versioning looks good for me.

What should we do?

Changed 16 years ago by Alpar Juttner

Attachment: e63a95b68827.patch added

Changed 16 years ago by Alpar Juttner

Attachment: 5d12d5c80ac9.patch added

comment:2 Changed 16 years ago by Alpar Juttner

  • [e63a95b68827] provides a simple python script script/chg-len.py for computing the longest path in the revision tree from the current changeset to the base. This measure has the property that if a changeset depend on the other, that this value is strictly better. Therefore it is usable for version numbering. An alternative would be to count the number of the changeset the current one is based on, but it would be a little bit more difficult to compute.
  • [5d12d5c80ac9] is a revised version numbering.
    • By default, the version of the repo is pathlen.hash, where pathlen is the value computed by script/chg-len.py and hash is the changeset id.
    • However if the LEMON_VERSION environment variable is defined when calling autoreconf -vif, then it will be the version. So if you want to give a version you should issue a a command like this:
      LEMON_VERION=1.2 autoreconf -vif
      

comment:3 Changed 16 years ago by Akos Ladanyi

I've tested your patches, and they seem to work.

comment:4 Changed 15 years ago by Alpar Juttner

Resolution: fixed
Status: newclosed

Changesets [e63a95b68827] and [5d12d5c80ac9] are in the main branch now.

Akos also patched the cmake config file in order to make it possible to set the version number without modifying any files in the repo, see [2a33883915bb].

So we can close this ticket.

Note: See TracTickets for help on using tickets.