[ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255935#action_255935 ]
Fabien Bousquet commented on SCM-606: ------------------------------------- I added an assert in test in SCM606_bis.patch for show the bug. For test on git-blame.out, on line 27 (of source file), it's : {code} e670863b2b03e158c59f34af1fee20f91b2bd852 27 26 4 import org.apache.maven.scm.ScmVersion; {code} The author+committer infos are NOT repeated because of "followed by the following information at least once for each commit". So, I agree with you when 'reuse' the info above, but when this information is not repeated, these informations (commiter and release date) must be retrieve in the previous blames lines. > UnsupportedOperationException on blame GIT > ------------------------------------------ > > Key: SCM-606 > URL: http://jira.codehaus.org/browse/SCM-606 > Project: Maven SCM > Issue Type: Wish > Components: maven-scm-provider-git > Affects Versions: 1.4 > Reporter: Fabien Bousquet > Assignee: Mark Struberg > Priority: Minor > Fix For: 1.5 > > Attachments: GitBlame_UnsupportedOperationException.patch, > SCM606_bis.patch > > > Sometimes, running the blame command for GIT return an error for exit code. > In this case, Maven SCM throw an > UnsupportedOperationException : > {code} > Caused by: java.lang.UnsupportedOperationException > at > org.apache.maven.scm.provider.git.gitexe.command.blame.GitBlameCommand.executeBlameCommand(GitBlameCommand.java:46) > etc... > {code} > Is it possible to have the same way that others providers (SVN or TFS for > example) which is to return a > result (with a success to false) ? > In other word replace : > {code} > throw new UnsupportedOperationException(); > {code} > by : > {code} > return new BlameScmResult(cl.toString(), "The git command failed.", > stderr.getOutput(), false); > {code} > Another reason is that we do not know that this UnsupportedOperationException > may be raised because is > a RuntimeException. > A similar problem : http://jira.codehaus.org/browse/SONARPLUGINS-618 > Do you agree with that ? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira