[Asterisk-code-review] version parser: Add a module for parsing Asterisk versions (repotools[master])

Matt Jordan asteriskteam at digium.com
Thu May 7 15:37:40 CDT 2015


Hello Samuel Galarneau,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/379

to look at the new patch set (#3).

Change subject: version_parser: Add a module for parsing Asterisk versions
......................................................................

version_parser: Add a module for parsing Asterisk versions

This patch adds a module for parsing Asterisk versions. While it is
similar to the version.py module in the Asterisk Test Suite, it differs
in a few important ways:
(1) It only parses actual Asterisk tagged versions, and not any
    arbitrary source control derived version string. As such, portions
    of the logic are substantially simpler.
(2) The primary purpose of the Test Suite version.py module is to
    compare relative versions. On the other hand, most scripts in
    repotools care more about taking one particular version and
    calculating various versions related to it in some fashion. This
    patch deals more with this latter purpose.

The implemented class can handle versions:
 * Prefixed with a '1' (pre-10) or non-prefixed (10+)
 * With any arbitrary modifiers, e.g., 'beta', 'rc', etc., in a
   descending priority order
 * From non-mainline branches, prefixed with a tag modifier, e.g.,
   'certified/'

In addition, an instance of the class can provide the previous logical
tag, which is useful for other scripts in repotools.

REP-15

Change-Id: I73661d43819388bda383ef4ba1c6ecdeee761fa9
---
A version_parser.py
1 file changed, 498 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/repotools refs/changes/79/379/3
-- 
To view, visit https://gerrit.asterisk.org/379
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I73661d43819388bda383ef4ba1c6ecdeee761fa9
Gerrit-PatchSet: 3
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Samuel Galarneau <sgalarneau at digium.com>



More information about the asterisk-code-review mailing list