You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "franek (JIRA)" <ji...@codehaus.org> on 2013/04/17 10:24:52 UTC

[jira] (SCM-684) Mercurial - Unparseable date

    [ https://jira.codehaus.org/browse/SCM-684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=323816#comment-323816 ] 

franek commented on SCM-684:
----------------------------

The problem is resolved for Scm Activity Plugin (I have updated Jenkins and Sonar to the last version).

But I have got the same problem with ScmStatsPlugin.

{noformat} 
EXECUTING: /bin/sh -c cd /var/lib/jenkins/jobs/<my project>/workspace/sources && hg log --verbose --no-merges --date '1970-01-02 to 2013-04-17'
09:26:27.996 WARN  .p.s.SonarScmManager - skip ParseException: Unparseable date: "Tue Apr 16 17:00:30 2013 +0200" during parsing date Tue Apr 16 17:00:30 2013 +0200 with pattern yyyy-MM-dd HH:mm:ss Z with Locale en
java.text.ParseException: Unparseable date: "Tue Apr 16 17:00:30 2013 +0200"
{noformat} 

Perhaps, a solution could to run hg log with a template (http://hgbook.red-bean.com/read/customizing-the-output-of-mercurial.html#sec:template:filter) :
{noformat} 
$ hg log -r1 --template 'date: {date|isodate}\n'
date: 2012-02-10 16:12 +0100
{noformat} 



                
> Mercurial - Unparseable date
> ----------------------------
>
>                 Key: SCM-684
>                 URL: https://jira.codehaus.org/browse/SCM-684
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-mercurial (hg)
>    Affects Versions: 1.5
>            Reporter: franek
>            Priority: Blocker
>
> Scm Activity Plugin returns a warning for many lines of my code :
> {code}
> java.text.ParseException: Unparseable date: "<us...@mail.com> c55d9b230751 Wed Jun 06 14:15:52 2012 +0200"
> 	at java.text.DateFormat.parse(DateFormat.java:337) ~[na:1.6.0_31]
> 	at org.apache.maven.scm.util.AbstractConsumer.parseDate(AbstractConsumer.java:112) ~[maven-scm-api-1.7.jar:1.7]
> 	at org.apache.maven.scm.provider.hg.command.blame.HgBlameConsumer.doConsume(HgBlameConsumer.java:71) [maven-scm-provider-hg-1.7.jar:1.7]
> 	at org.apache.maven.scm.provider.hg.command.HgConsumer.consumeLine(HgConsumer.java:131) [maven-scm-provider-hg-1.7.jar:1.7]
> 	at org.codehaus.plexus.util.cli.StreamPumper.consumeLine(StreamPumper.java:197) [plexus-utils-2.0.5.jar:na]
> {code}
> It is due to this command : 
> {code}
> hg blame --user --date --changeset File.txt
> {code}
> It returns : 
> {code}
> firstname lastname <us...@mail.com> c55d9b230751 Tue Jun 19 14:20:07 2012 +0200:
> {code}
> Whereas the plugins expects (no space between firstname and lastname) : 
> {code}
> firstnamelastname <us...@mail.com> c55d9b230751 Tue Jun 19 14:20:07 2012 +0200:
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira