maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Bernardet (JIRA)" <>
Subject [jira] Created: (SCM-560) The capturing of mercurial revision is invalid
Date Tue, 29 Jun 2010 08:57:32 GMT
The capturing of mercurial revision is invalid

                 Key: SCM-560
             Project: Maven SCM
          Issue Type: Bug
          Components: maven-scm-provider-mercurial (hg)
         Environment: Windows + JDK6 + Ant
            Reporter: William Bernardet

The HgRevNoConsumer is parsing the output of hg id command using the full line and assuming
the revision is a number matching [0-9] numbers

Mercurial can return an id with the revision branch and tag label e.g:
58bda09e68fa tip
or if the repo contains uncommited changes:
58bda09e68fa+ tip

The extraction of the revision should be updated by splitting the line and take the first
part only and then remove the ending '+' if needed. Then the resulting string should be converted
using radix 16 (int is not able to store the result), code should be something like that:
long revision = Long.parse(line.split("\\s+")[0].trim("+"), 16);

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message