Examples of ScmFileStatus


Examples of org.apache.maven.scm.ScmFileStatus

            out.append( "Comment:" + entry.getComment() );

            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

Examples of org.apache.maven.scm.ScmFileStatus

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

        ScmFileStatus status = null;

        List<String> files = new ArrayList<String>();

        if ( addedRegexp.match( line ) )
        {
View Full Code Here

Examples of org.apache.maven.scm.ScmFileStatus

            {
                file = file.substring( this.workingDirectory.getAbsolutePath().length() + 1 );
            }
        }

        ScmFileStatus status;

        if ( line.startsWith( UPDATED_TO_REVISION_TOKEN ) )
        {
            String revisionString = line.substring( UPDATED_TO_REVISION_TOKEN.length() + 1, line.length() - 1 );
View Full Code Here

Examples of org.apache.maven.scm.ScmFileStatus

        {
            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

Examples of org.apache.maven.scm.ScmFileStatus

        if ( file.startsWith( getWorkingDirectory().getAbsolutePath() ) )
        {
            file = StringUtils.substring( file, getWorkingDirectory().getAbsolutePath().length() + 1 );
        }

        ScmFileStatus status;

        if ( line.startsWith( CHECKED_OUT_REVISION_TOKEN ) )
        {
            String revisionString = line.substring( CHECKED_OUT_REVISION_TOKEN.length() + 1, line.length() - 1 );
View Full Code Here

Examples of org.apache.maven.scm.ScmFileStatus

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

        String file = line.substring( 3 );

        ScmFileStatus status;

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

Examples of org.apache.maven.scm.ScmFileStatus

                    originalName = ORIG_FILE_PATTERN.getParen( 1 );
                    originalRev = ORIG_FILE_PATTERN.getParen( 2 );
                }
            }
            final String actionStr = FILE_PATTERN.getParen( 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

Examples of org.apache.maven.scm.ScmFileStatus

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

        String file = line.substring( 3 );

        ScmFileStatus status;

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

Examples of org.apache.maven.scm.ScmFileStatus

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

        String file = line.substring( 3 );

        ScmFileStatus status;

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

Examples of org.apache.maven.scm.ScmFileStatus

        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
TOP
Copyright © 2018 www.massapi.com. 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.