comparison src/org/tmatesoft/hg/core/HgLogCommand.java @ 559:6ca3d0c5b4bc

Commit: tests and fixes for defects discovered
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 25 Feb 2013 19:48:20 +0100
parents f7fbf48b9383
children 78a9e26e670d
comparison
equal deleted inserted replaced
558:154718ae23ed 559:6ca3d0c5b4bc
296 throw new IllegalArgumentException(); 296 throw new IllegalArgumentException();
297 } 297 }
298 if (csetTransform != null) { 298 if (csetTransform != null) {
299 throw new ConcurrentModificationException(); 299 throw new ConcurrentModificationException();
300 } 300 }
301 if (repo.getChangelog().getRevisionCount() == 0) {
302 return;
303 }
301 final int lastCset = endRev == TIP ? repo.getChangelog().getLastRevision() : endRev; 304 final int lastCset = endRev == TIP ? repo.getChangelog().getLastRevision() : endRev;
302 // XXX pretty much like HgInternals.checkRevlogRange 305 // XXX pretty much like HgInternals.checkRevlogRange
303 if (lastCset < 0 || lastCset > repo.getChangelog().getLastRevision()) { 306 if (lastCset < 0 || lastCset > repo.getChangelog().getLastRevision()) {
304 throw new HgBadArgumentException(String.format("Bad value %d for end revision", endRev), null); 307 throw new HgBadArgumentException(String.format("Bad value %d for end revision", lastCset), null);
305 } 308 }
306 if (startRev < 0 || startRev > lastCset) { 309 if (startRev < 0 || startRev > lastCset) {
307 throw new HgBadArgumentException(String.format("Bad value %d for start revision for range [%1$d..%d]", startRev, lastCset), null); 310 throw new HgBadArgumentException(String.format("Bad value %d for start revision for range [%1$d..%d]", startRev, lastCset), null);
308 } 311 }
309 final ProgressSupport progressHelper = getProgressSupport(handler); 312 final ProgressSupport progressHelper = getProgressSupport(handler);