我想从3到7打印出不是全部的修订版。有人可以解释怎么做吗?
logEntries = repository.log(new String[] {""}, null,
about.getStartRevision(), about.getEndRevision(), true, true);
}
for (Iterator entries = logEntries.iterator(); entries.hasNext();) {
/*
* gets a next SVNLogEntry
*/
SVNLogEntry logEntry = (SVNLogEntry) entries.next();
System.out.println("_________________________________________________________");
/*
* gets the revision number
*/
System.out.println("Revision: " + logEntry.getRevision());
/*
* gets the author of the changes made in that revision
*/
System.out.println("Author: " + logEntry.getAuthor());
答案 0 :(得分:0)
logEntries = repository.log(new String[] {""}, null,
about.getStartRevision(), about.getEndRevision(), true, true);
}
for (Iterator entries = logEntries.iterator(); entries.hasNext();) {
/*
* gets a next SVNLogEntry
*/
SVNLogEntry logEntry = (SVNLogEntry) entries.next();
System.out.println("_________________________________________________________");
/*
* gets the revision number
*/
if(3<=logEntry.getRevision()&&logEntry.getRevision()<=7){
System.out.println("Revision: " + logEntry.getRevision());
}
/*
* gets the author of the changes made in that revision
*/
System.out.println("Author: " + logEntry.getAuthor());
答案 1 :(得分:0)
检查修订号是否在3到7之间,如果是,则显示。
for (Iterator entries = logEntries.iterator(); entries.hasNext();) {
/*
* gets a next SVNLogEntry
*/
SVNLogEntry logEntry = (SVNLogEntry) entries.next();
int revisionNumber = logEntry.getRevision();
if(revisionNumber => 3 && revisionNumber <= 7) {
System.out.println("____________________________________________________");
/*
* gets the revision number
*/
System.out.println("Revision: " + revisionNumber);
/*
* gets the author of the changes made in that revision
*/
System.out.println("Author: " + logEntry.getAuthor());
}