[ 
http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255692#action_255692
 ] 

Mark Struberg commented on SCM-606:
-----------------------------------

maybe it's even depending on the Locale, ...

A few of my findings so far indicate that I'll need to rewrite the whole 
GitLogConsumer to use regexp (will commit test cases + fix later):

git-blame outputs spaces over here:

^e670863 (Mark Struberg 2007-11-22 22:16:03 +0100  17)  * KIND, either express 
or implied.  See the License for the
^e670863 (Mark Struberg 2007-11-22 22:16:03 +0100  18)  * specific language 
governing permissions and limitations

------------------

git-blame with user.name="Mark (work)" (bracelets in the user.name)

66e621ed (Mark (work) 2011-02-11 19:01:15 +0100 1) testcontent

------------------

git-blame on a fresh file (not committed yet...)

00000000 (Not Committed Yet 2011-02-11 18:21:25 +0100  1) [core]
00000000 (Not Committed Yet 2011-02-11 18:21:25 +0100  2)       
repositoryformatversion = 0

------------------

will of course also test a git-blame on an empty file and things.

If you have ideas of additional things to check, then please post ;)

LieGrue,
strub

> 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
>         Attachments: GitBlame_UnsupportedOperationException.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

        

Reply via email to