@Test public void testParseLine() { File file = new File( "mine/a" ); consumer = new SvnCheckOutConsumer( new ScmLogDispatcher(), file ); consumer.parseLine( "A " + file.getAbsolutePath() ); consumer.parseLine( "Checked out revision 1345915." ); Assert.assertEquals( 1345915, consumer.getRevision()); }
protected void parseLine( String line ) { String statusString = line.substring( 0, 1 ); String file = line.substring( 3 ).trim(); 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 ); revision = parseInt( revisionString ); return; } else if ( statusString.equals( "A" ) ) { status = ScmFileStatus.ADDED; } else if ( statusString.equals( "U" ) ) { status = ScmFileStatus.UPDATED; } else { return; } addFile( new ScmFile( file, status ) ); }
SvnCheckOutConsumer extends AbstractFileCheckingConsumer { protected void parseLine( String line ) { String statusString = line.substring( 0, 1 ); String file = line.substring( 3 ).trim(); 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 ); revision = parseInt( revisionString ); return; } else if ( statusString.equals( "A" ) ) { status = ScmFileStatus.ADDED; } else if ( statusString.equals( "U" ) ) { status = ScmFileStatus.UPDATED; } else { return; } addFile( new ScmFile( file, status ) ); } }
SvnCheckOutConsumer extends AbstractFileCheckingConsumer { protected void parseLine( String line ) { String statusString = line.substring( 0, 1 ); String file = line.substring( 3 ).trim(); 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 ); revision = parseInt( revisionString ); return; } else if ( statusString.equals( "A" ) ) { status = ScmFileStatus.ADDED; } else if ( statusString.equals( "U" ) ) { status = ScmFileStatus.UPDATED; } else { return; } addFile( new ScmFile( file, status ) ); } SvnCheckOutConsumer( ScmLogger logger, File workingDirectory ); }
SvnCheckOutConsumer extends AbstractFileCheckingConsumer { protected void parseLine( String line ) { String statusString = line.substring( 0, 1 ); String file = line.substring( 3 ).trim(); 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 ); revision = parseInt( revisionString ); return; } else if ( statusString.equals( "A" ) ) { status = ScmFileStatus.ADDED; } else if ( statusString.equals( "U" ) ) { status = ScmFileStatus.UPDATED; } else { return; } addFile( new ScmFile( file, status ) ); } SvnCheckOutConsumer( ScmLogger logger, File workingDirectory ); List<ScmFile> getCheckedOutFiles(); }
SvnCheckOutConsumer extends AbstractFileCheckingConsumer { protected void parseLine( String line ) { String statusString = line.substring( 0, 1 ); String file = line.substring( 3 ).trim(); 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 ); revision = parseInt( revisionString ); return; } else if ( statusString.equals( "A" ) ) { status = ScmFileStatus.ADDED; } else if ( statusString.equals( "U" ) ) { status = ScmFileStatus.UPDATED; } else { return; } addFile( new ScmFile( file, status ) ); } SvnCheckOutConsumer( ScmLogger logger, File workingDirectory ); List<ScmFile> getCheckedOutFiles();  }