/** * Add a change log entry to the list (if it's not already there) * with the given file. * * @param entry a {@link ChangeSet} to be added to the list if another * with the same key (p4 change number) doesn't exist already. * @param file a {@link ChangeFile} to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { entry.addFile( file ); }
/** * Add a change log entry to the list (if it's not already there) * with the given file. * * @param entry a {@link ChangeSet} to be added to the list if another * with the same key (p4 change number) doesn't exist already. * @param file a {@link ChangeFile} to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { entry.addFile( file ); }
/** * Add a change log entry to the list (if it's not already there) with the * given file. * * @param entry a {@link ChangeSet}to be added to the list if another * with the same key doesn't exist already. If the entry's author * is null, the entry wont be added * @param file a {@link ChangeFile}to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // do not add if entry is not populated if ( entry.getAuthor() == null ) { return; } entry.addFile( file ); entries.add( entry ); }
/** * Add a change log entry to the list (if it's not already there) with the * given file. * * @param entry a {@link ChangeSet}to be added to the list if another * with the same key doesn't exist already. If the entry's author * is null, the entry wont be added * @param file a {@link ChangeFile}to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // do not add if entry is not populated if ( entry.getAuthor() == null ) { return; } entry.addFile( file ); entries.add( entry ); }
/** * Add a change log entry to the list (if it's not already there) with the * given file. * * @param entry a {@link ChangeSet}to be added to the list if another * with the same key doesn't exist already. If the entry's author * is null, the entry wont be added * @param file a {@link ChangeFile}to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // do not add if entry is not populated if ( entry.getAuthor() == null ) { return; } entry.addFile( file ); entries.add( entry ); }
currentEntry.addFile( (ChangeFile) entry.getFiles().get( 0 ) );
/** * Add a change log entry to the list (if it's not already there) * with the given file. * * @param entry a {@link ChangeSet} to be added to the list if another * with the same key (p4 change number) doesn't exist already. * @param file a {@link ChangeFile} to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // ---------------------------------------------------------------------- // Check that we are inside the requested date range // ---------------------------------------------------------------------- if ( startDate != null && entry.getDate().before( startDate ) ) { return; } if ( endDate != null && entry.getDate().after( endDate ) ) { return; } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- entry.addFile( file ); entries.add( entry ); }
currentEntry.addFile( (ChangeFile) entry.getFiles().get( 0 ) );
/** * Add a change log entry to the list (if it's not already there) * with the given file. * * @param entry a {@link ChangeSet} to be added to the list if another * with the same key (p4 change number) doesn't exist already. * @param file a {@link ChangeFile} to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // ---------------------------------------------------------------------- // Check that we are inside the requested date range // ---------------------------------------------------------------------- if ( startDate != null && entry.getDate().before( startDate ) ) { return; } if ( endDate != null && entry.getDate().after( endDate ) ) { return; } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- entry.addFile( file ); entries.add( entry ); }
public List<ChangeSet> getModifications() throws ScmException { // Here there are one entry for each couple (changelist,file). We merge // entries to have only one entry per changelist // Date > ChangeSet Map<Date, ChangeSet> groupedEntries = new LinkedHashMap<Date, ChangeSet>(); for ( int i = 0; i < entries.size(); i++ ) { ChangeSet cs = (ChangeSet) entries.get( i ); ChangeSet hit = (ChangeSet) groupedEntries.get( cs.getDate() ); if ( hit != null ) { if ( cs.getFiles().size() != 1 ) { throw new ScmException( "Merge of entries failed. Bad entry size: " + cs.getFiles().size() ); } hit.addFile( (ChangeFile) cs.getFiles().get( 0 ) ); } else { groupedEntries.put( cs.getDate(), cs ); } } List<ChangeSet> result = new ArrayList<ChangeSet>(); result.addAll( groupedEntries.values() ); return result; }
/** * Add a change log entry to the list (if it's not already there) * with the given file. * * @param entry a {@link ChangeSet} to be added to the list if another * with the same key doesn't exist already. If the entry's author * is null, the entry wont be added * @param file a {@link ChangeFile} to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // do not add if entry is not populated if ( entry.getAuthor() == null ) { return; } // do not add if entry is out of date range if ( startDate != null && entry.getDate().before( startDate ) ) { return; } if ( endDate != null && entry.getDate().after( endDate ) ) { return; } entry.addFile( file ); entries.add( entry ); }
public List<ChangeSet> getModifications() throws ScmException { // Here there are one entry for each couple (changelist,file). We merge // entries to have only one entry per changelist // Date > ChangeSet Map<Date, ChangeSet> groupedEntries = new LinkedHashMap<Date, ChangeSet>(); for ( int i = 0; i < entries.size(); i++ ) { ChangeSet cs = (ChangeSet) entries.get( i ); ChangeSet hit = (ChangeSet) groupedEntries.get( cs.getDate() ); if ( hit != null ) { if ( cs.getFiles().size() != 1 ) { throw new ScmException( "Merge of entries failed. Bad entry size: " + cs.getFiles().size() ); } hit.addFile( (ChangeFile) cs.getFiles().get( 0 ) ); } else { groupedEntries.put( cs.getDate(), cs ); } } List<ChangeSet> result = new ArrayList<ChangeSet>(); result.addAll( groupedEntries.values() ); return result; }
/** * Add a change log entry to the list (if it's not already there) * with the given file. * * @param entry a {@link ChangeSet} to be added to the list if another * with the same key doesn't exist already. If the entry's author * is null, the entry wont be added * @param file a {@link ChangeFile} to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // do not add if entry is not populated if ( entry.getAuthor() == null ) { return; } // do not add if entry is out of date range if ( startDate != null && entry.getDate().before( startDate ) ) { return; } if ( endDate != null && entry.getDate().after( endDate ) ) { return; } entry.addFile( file ); entries.add( entry ); }
currentChange.addFile( changeFile );
currentChange.addFile( changeFile );
changeFile.setOriginalName( originalName ); changeFile.setOriginalRevision( originalRevision ); currentChange.addFile( changeFile );
/** * Process the current input line in the Get Comment state. * * @param line a line of text from the clearcase log output */ private void processGetCommentAndUser( String line ) { if ( line.startsWith( COMMENT_TAG ) ) { String comm = line.substring( COMMENT_TAG.length() ); getCurrentChange().setComment( getCurrentChange().getComment() + comm + "\n" ); } else if ( line.startsWith( USER_TAG ) ) { getCurrentChange().setAuthor( line.substring( USER_TAG.length() ) ); // add entry, and set state to get file getCurrentChange().addFile( getCurrentFile() ); entries.add( getCurrentChange() ); setStatus( GET_REVISION ); } else { // keep gathering comments getCurrentChange().setComment( getCurrentChange().getComment() + line + "\n" ); } }
/** * Process the current input line in the Get Comment state. * * @param line a line of text from the clearcase log output */ private void processGetCommentAndUser( String line ) { if ( line.startsWith( COMMENT_TAG ) ) { String comm = line.substring( COMMENT_TAG.length() ); getCurrentChange().setComment( getCurrentChange().getComment() + comm + "\n" ); } else if ( line.startsWith( USER_TAG ) ) { getCurrentChange().setAuthor( line.substring( USER_TAG.length() ) ); // add entry, and set state to get file getCurrentChange().addFile( getCurrentFile() ); entries.add( getCurrentChange() ); setStatus( GET_REVISION ); } else { // keep gathering comments getCurrentChange().setComment( getCurrentChange().getComment() + line + "\n" ); } }