Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmFileStatus


        if ( StringUtils.isEmpty( line ) )
        {
            return;
        }

        ScmFileStatus status = null;

        List<String> files = new ArrayList<String>();
       
        Matcher matcher;
        if ( ( matcher = ADDED_PATTERN.matcher( line ) ).find() )
View Full Code Here


            {
                return;
            }
            final String actionChar = matcher.group( 1 );
            // action is currently not used
            final ScmFileStatus action;
            String name = matcher.group( 2 );
            String originalName = null;
            String originalRevision = null;
            if ( "A".equals( actionChar ) )
            {
View Full Code Here

        if ( StringUtils.isEmpty( line ) )
        {
            return;
        }

        ScmFileStatus status = null;

        String[] parts = line.split( "\\s", 6 );
        if ( parts.length != 6 )
        {
            logger.warn( "Skipping line because it doesn't contain the right status parameters: " + line );
View Full Code Here

        VERB.put( "refreshing", ScmFileStatus.UNKNOWN );
    }

    public static ScmFileStatus toStatus( String verb )
    {
        ScmFileStatus stat = (ScmFileStatus) VERB.get( verb );
        if ( stat == null )
        {
            // XXX testing only
            System.err.println( "No such verb: " + verb );
            return ScmFileStatus.UNKNOWN;
View Full Code Here

        String statusString = line.substring( 0, 1 );

        String file = line.substring( 3 );

        ScmFileStatus status;

        if ( statusString.equals( "D" ) )
        {
            status = ScmFileStatus.DELETED;
        }
View Full Code Here

            //Strip away identifier
            trimmedLine = trimmedLine.substring( statusStr.length() );
            trimmedLine = trimmedLine.trim(); //one or more spaces
        }

        ScmFileStatus status = statusStr != null ? ( (ScmFileStatus) IDENTIFIERS.get( statusStr.intern() ) ) : null;
        doConsume( status, trimmedLine );
    }
View Full Code Here

                    originalName = matcher2.group( 1 );
                    originalRev = matcher2.group( 2 );
                }
            }
            final String actionStr = matcher.group( 1 );
            final ScmFileStatus action;
            if ( "A".equals( actionStr ) )
            {
                //TODO: this may even change to MOVED if we later explore whole changeset and find matching DELETED
                action = originalRev == null ? ScmFileStatus.ADDED : ScmFileStatus.COPIED;
            }
View Full Code Here

        String statusString = line.substring( 0, 1 );

        String file = line.substring( 7 ).trim();

        ScmFileStatus status;

        //  The first six columns in the output are each one character wide:
        //    First column: Says if item was added, deleted, or otherwise changed
        //      ' ' no modifications
        //      'A' Added
        //      'C' Conflicted
        //      'D' Deleted
        //      'I' Ignored
        //      'M' Modified
        //      'R' Replaced
        //      'X' item is unversioned, but is used by an externals definition
        //      '?' item is not under version control
        //      '!' item is missing (removed by non-svn command) or incomplete
        //      '~' versioned item obstructed by some item of a different kind
        //    Second column: Modifications of a file's or directory's properties
        //      ' ' no modifications
        //      'C' Conflicted
        //      'M' Modified
        //    Third column: Whether the working copy directory is locked
        //      ' ' not locked
        //      'L' locked
        //    Fourth column: Scheduled commit will contain addition-with-history
        //      ' ' no history scheduled with commit
        //      '+' history scheduled with commit
        //    Fifth column: Whether the item is switched relative to its parent
        //      ' ' normal
        //      'S' switched
        //    Sixth column: Repository lock token
        //      (without -u)
        //      ' ' no lock token
        //      'K' lock token present
        //      (with -u)
        //      ' ' not locked in repository, no lock token
        //      'K' locked in repository, lock toKen present
        //      'O' locked in repository, lock token in some Other working copy
        //      'T' locked in repository, lock token present but sTolen
        //      'B' not locked in repository, lock token present but Broken
        //
        //  The out-of-date information appears in the eighth column (with -u):
        //      '*' a newer revision exists on the server
        //      ' ' the working copy is up to date
        if ( statusString.equals( "A" ) )
        {
            status = ScmFileStatus.ADDED;
        }
        else if ( statusString.equals( "M" ) || statusString.equals( "R" ) || statusString.equals( "~" ) )
        {
            status = ScmFileStatus.MODIFIED;
        }
        else if ( statusString.equals( "D" ) )
        {
            status = ScmFileStatus.DELETED;
        }
        else if ( statusString.equals( "?" ) )
        {
            status = ScmFileStatus.UNKNOWN;
        }
        else if ( statusString.equals( "!" ) )
        {
            status = ScmFileStatus.MISSING;
        }
        else if ( statusString.equals( "C" ) )
        {
            status = ScmFileStatus.CONFLICT;
        }
        else if ( statusString.equals( "L" ) )
        {
            status = ScmFileStatus.LOCKED;
        }
        else if ( statusString.equals( "X" ) )
        {
            //skip svn:external entries
            return;
        }
        else if ( statusString.equals( "I" ) )
        {
            //skip svn:external entries
            return;
        }
        else
        {
            //Parse the second column
            statusString = line.substring( 1, 1 );

            if ( statusString.equals( "M" ) )
            {
                status = ScmFileStatus.MODIFIED;
            }
            else if ( statusString.equals( "C" ) )
            {
                status = ScmFileStatus.CONFLICT;
            }
            else
            {
                //The line isn't a status line, ie something like 'Performing status on external item at...'
                //or a status defined in next columns
                return;
            }
        }

        // If the file isn't a file; don't add it.
        if ( !status.equals( ScmFileStatus.DELETED ) && !new File( workingDirectory, file ).isFile() )
        {
            return;
        }

        changedFiles.add( new ScmFile( file, status ) );
View Full Code Here

        {
            return;
        }
       
        String statusString = line.substring( 0, 1 );
        ScmFileStatus status;
      
        if ( line.startsWith( COMMITTED_REVISION_TOKEN ) )
        {
            String revisionString = line.substring( COMMITTED_REVISION_TOKEN.length() + 1, line.length() - 1 );
View Full Code Here

        String statusString = line.substring( 0, 1 );

        String file = line.substring( 3 );

        ScmFileStatus status;

        if ( statusString.equals( "A" ) )
        {
            status = ScmFileStatus.ADDED;
        }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.ScmFileStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.