[ 
https://issues.apache.org/jira/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17962222#comment-17962222
 ] 

ASF GitHub Bot commented on SCM-606:
------------------------------------

jira-importer opened a new issue, #820:
URL: https://github.com/apache/maven-scm/issues/820

   **[Fabien 
Bousquet](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=fafanoulele)**
 opened 
**[SCM-606](https://issues.apache.org/jira/browse/SCM-606?redirect=false)** and 
commented
   
   Sometimes, running the blame command for GIT return an error for exit code. 
In this case, Maven SCM throw an
   UnsupportedOperationException :
   
   ```
   Caused by: java.lang.UnsupportedOperationException
   at 
org.apache.maven.scm.provider.git.gitexe.command.blame.GitBlameCommand.executeBlameCommand(GitBlameCommand.java:46)
   etc...
   ```
   
   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 :
   
   ```
   throw new UnsupportedOperationException();
   ```
   
   by :
   
   ```
   return new BlameScmResult(cl.toString(), "The git command failed.", 
stderr.getOutput(), false);
   ```
   
   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 ?
   
   
   ---
   
   **Affects:** 1.4
   
   **Attachments:**
   - 
[GitBlame_UnsupportedOperationException.patch](https://issues.apache.org/jira/secure/attachment/12718622/GitBlame_UnsupportedOperationException.patch)
 (_1008 bytes_)
   - 
[SCM606_bis.patch](https://issues.apache.org/jira/secure/attachment/12718666/SCM606_bis.patch)
 (_4.42 kB_)
   
   **Issue Links:**
   - [SCM-532](https://issues.apache.org/jira/browse/SCM-532) Please add 
support for blame command
    (_**"duplicates"**_)
   




> UnsupportedOperationException on blame GIT
> ------------------------------------------
>
>                 Key: SCM-606
>                 URL: https://issues.apache.org/jira/browse/SCM-606
>             Project: Maven SCM (Moved to GitHub Issues)
>          Issue Type: Wish
>          Components: maven-scm-provider-gitexe
>    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 was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to