Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmFileStatus


            {
                String path = file.getPath().replace( '\\', '/' );
                File repoFile = new File( repoRoot, path );
                file = new File( baseDestination, path );

                ScmFileStatus status;

                if ( repoFile.exists() )
                {
                    String repoFileContents = FileUtils.fileRead( repoFile );
View Full Code Here


            {
                throw new ScmException(
                    "Could not create destination directory '" + destinationDirectory.getAbsolutePath() + "'." );
            }

            ScmFileStatus status;

            if ( destinationFile.exists() )
            {
                status = ScmFileStatus.UPDATED;
            }
View Full Code Here

    private void extractChangedFile()
    {
        String change = getChange();
        if ( change != null )
        {
            ScmFileStatus stat = ScmFileStatus.UNKNOWN;
            if ( change.equals( ChangedFileConsumer.CHANGE_EDIT ) )
                stat = ScmFileStatus.MODIFIED;
            if ( change.equals( ChangedFileConsumer.CHANGE_ADD ) )
                stat = ScmFileStatus.ADDED;
            changedFiles.add( new ScmFile( getLocalPath(), stat ) );
View Full Code Here

            {
                return;
            }
            final String actionChar = fileRegexp.getParen( 1 );
            // action is currently not used
            final ScmFileStatus action;
            String name = fileRegexp.getParen( 2 );
            String originalName = null;
            String originalRevision = null;
            if ( "A".equals( actionChar ) )
            {
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

        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

            assertNotNull( entry.getFiles() );
            assertFalse( entry.getFiles().isEmpty() );

            for ( ChangeFile file : entry.getFiles() )
            {
                final ScmFileStatus action = file.getAction();
                if ( !summary.containsKey( action ) )
                {
                    summary.put( action, new AtomicInteger() );
                }
                summary.get( action ).incrementAndGet();
View Full Code Here

            String location = fileRegexp.getParen( 1 );
            if ( location.startsWith( repo ) )
            {
                location = location.substring( repo.length() + 1 );
            }
            ScmFileStatus status = PerforceVerbMapper.toStatus( fileRegexp.getParen( 2 ) );
            if ( status != null )
            {
                // there are cases where Perforce prints out something but the file did not
                // actually change (especially when force syncing).  Those files will have
                // a null status.
View Full Code Here

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

        String file = line.substring( 2 );

        ScmFileStatus status;

        if ( statusString.equals( "A" ) )
        {
            status = ScmFileStatus.ADDED;
        }
        else if ( statusString.equals( "M" ) )
        {
            status = ScmFileStatus.MODIFIED;
        }
        else if ( statusString.equals( "D" ) )
        {
            status = ScmFileStatus.DELETED;
        }
        else if ( statusString.equals( "C" ) )
        {
            status = ScmFileStatus.CONFLICT;
        }
        else if ( statusString.equals( "?" ) )
        {
            status = ScmFileStatus.UNKNOWN;
        }
        else if ( statusString.equals( "U" ) || statusString.equals( "P" ) )
        {
            // skip remote changes
            return;
        }
        else
        {
            if ( logger.isInfoEnabled() )
            {
                logger.info( "Unknown file status: '" + statusString + "'." );
            }

            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

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

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.