You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Fabien Bousquet (JIRA)" <ji...@codehaus.org> on 2011/02/10 19:04:22 UTC

[jira] Created: (SCM-606) UnsupportedOperationException on blame GIT

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
            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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255683#action_255683 ] 

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

I c. 

Did more research and it looks like we currently only split the output of git-blame on tabulator characters('\t'). But here on my installation (Fedora14, kernel-2.6.38, git-1.7.4) I get spaces as separator.

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Fabien Bousquet (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255691#action_255691 ] 

Fabien Bousquet commented on SCM-606:
-------------------------------------

My configurations tested :
* git-1.7.3 on Windows Vista
* git-1.7.4 on Windows Vista
* git-1.7.0.4 on a Linux

For these configurations, blame output is split on tabulator character.

I test on GitHub projects. 

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255844#action_255844 ] 

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

Fabien, 
did you really look at the porcelain description of git-blame?
Please see the section "THE PORCELAIN FORMAT"

according to this (and from looking at the C sources) the committer and committer-time must always exist.

"This header line is followed by the following information at least once for each commit:
he author name ("author"), email ("author-mail"), time ("author-time"), and timezone "author-tz"); similarly for committer."


Can you please provide a sample with both
$> git blame -p
$> git blame -c -l
So we can extend our unit tests!
Which git version do you use and which OS version are you running on?

txs and 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, 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Fabien Bousquet (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=256795#action_256795 ] 

Fabien Bousquet commented on SCM-606:
-------------------------------------

Thanks Mark for this fix !

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Fabien Bousquet (JIRA)" <ji...@codehaus.org>.
    [ 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

        

[jira] Closed: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg closed SCM-606.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 1.5

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Fabien Bousquet (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255640#action_255640 ] 

Fabien Bousquet commented on SCM-606:
-------------------------------------

This feature (blame for gitexe) is already implemented (See {code}org.apache.maven.scm.provider.git.gitexe.command.blame.GitBlameCommand{code}) . I use it already and it is operational.
Is what I'm wrong?




> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=256590#action_256590 ] 

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

should now finally be fixed!

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255694#action_255694 ] 

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

I think we should redo the parser and switch to the porcelain option finally
$> git blame -p

But that will take some time. So I will probably implement a quick fix for the current parser upfront and later re-implement it with -p.

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255846#action_255846 ] 

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

I guess I c what you mean:

"followed by the following information at least once for each commit"
That's exactly the reason why we cannot clean the author and date information!
If two or more following lines (right behind each other) got changed in the _same_ commit, then the author+committer info will NOT be contained in the blame info!

E.g. the first line looks like this

342345234aef32323214 2 2 3
author
author-time
...
committer-time
..
filename myfile.txt
summary thesummaryIentered
\t[tab] changed content of this line

but the following 2 lines (summary=3 = last number of the original sha-1 line)
342345234aef32323214 3 3
\t[tab] changed content of the 2nd line
342345234aef32323214 4 4
\t[tab] changed content of the 3nd line

Means they will NOT contain the author info again, but 'reuse' the info above.

> 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, 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

        

[jira] Updated: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Fabien Bousquet (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabien Bousquet updated SCM-606:
--------------------------------

    Attachment: SCM606_bis.patch

> 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, 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255801#action_255801 ] 

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

In git author and committer can be different. If I submit a linux patch and Linus takes and git-applys it to the kernel tree and push it upstream, then you will find Linus as committer and me as author...

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255592#action_255592 ] 

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

the way to go is to implement this feature for the maven-scm-provider-gitexe also.
Will do this in the next week.

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255714#action_255714 ] 

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

btw, not sure if this was intentionally, but what should scm:blame report? the author or the committer? Remember that this might be different in git!


> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=256568#action_256568 ] 

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

oki I now see what you mean. It only gets written once for each commit. But if n _non-consequent_ lines get transfered, then the committer/author/date information will not get repeated again (but only for the first time a commit sha-1 gets used in a file)
Currently working on a fix.

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Fabien Bousquet (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255767#action_255767 ] 

Fabien Bousquet commented on SCM-606:
-------------------------------------

Thanks !!!

I can't review now. So I will review and test tomorrow.

For difference between author and commiter, I don't understand. What is this difference ?

For my case, I want the last developer which has modified the line (for each line).

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Fabien Bousquet (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255820#action_255820 ] 

Fabien Bousquet commented on SCM-606:
-------------------------------------

I have a problem with date and author which may be falses.

The header line (author, commitor etc...) is followed by the following information at least once for *each commit* (See http://www.kernel.org/pub/software/scm/git/docs/git-blame.html). 
So when a release have already listed in blame output, date and author can be falses.
I propose a patch which stores release informations (author and date) and uses it when possible.

Mark, Could you review ?

> 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

        

[jira] Work started: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on SCM-606 started by Mark Struberg.

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255698#action_255698 ] 

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

Fabien, could you please attach a 
$> git blame --porcelain > git-blame2.out
?
Please use a repo/file which is ideally under ALv2. But at least not under some problematic license and content, need it for inclusion in our test suite ;)

> 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

        

[jira] Commented: (SCM-606) UnsupportedOperationException on blame GIT

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255736#action_255736 ] 

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

committed, review would be appreciated ;)

> 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