You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Victor Volle (JIRA)" <ji...@codehaus.org> on 2009/06/29 19:57:05 UTC

[jira] Commented: (SCM-480) "mvn scm:status" doesn't show modified file

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

Victor Volle commented on SCM-480:
----------------------------------

I found the reason:


In SvnStatusConsumer

           String file = line.substring( 7 );

The "file" variable then contains " pom.xml" with a leading whitespace!
Later on there is a test:

        if ( !status.equals( ScmFileStatus.DELETED ) && !new File( workingDirectory, file ).isFile() )
        {
            return;
        }

but since "file" has a leading white space, "new File(...).isFile" returns false.

I would propose switching to a pattern matcher instead of String indices.
A quick fix would be to simply trim the file name

> "mvn scm:status" doesn't show modified file
> -------------------------------------------
>
>                 Key: SCM-480
>                 URL: http://jira.codehaus.org/browse/SCM-480
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-svn
>    Affects Versions: 1.2
>         Environment: OS X 10.5.7
> JDK 1.5
> Maven 2.1.0
> SVN 1.6.2
>            Reporter: Victor Volle
>
> "svn status" gives
>     M       src/main/java/de/artive/test/FooBar.java
> "mvn scm:status" gives
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'scm'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building test-build
> [INFO]    task-segment: [scm:status] (aggregator-style)
> [INFO] ------------------------------------------------------------------------
> [INFO] [scm:status]
> [INFO] Executing: /bin/sh -c cd /Users/vivo/workspaces/eclipse-3.4/test-build && svn --username vivo --password '*****' --non-interactive status
> [INFO] Working directory: /Users/vivo/workspaces/eclipse-3.4/test-build
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Jun 26 13:01:04 CEST 2009
> [INFO] Final Memory: 15M/29M
> [INFO] ------------------------------------------------------------------------
> The changed file is not shown. 
> This wouldn't be that bad, if the the release plugin therefore would not recognize that there still is a modified file in the workspace

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