Mercurial > hg4j
diff src/org/tmatesoft/hg/internal/ChangelogMonitor.java @ 628:6526d8adbc0f
Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 22 May 2013 15:52:31 +0200 |
parents | 5c68567b3645 |
children |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/ChangelogMonitor.java Tue May 21 20:17:33 2013 +0200 +++ b/src/org/tmatesoft/hg/internal/ChangelogMonitor.java Wed May 22 15:52:31 2013 +0200 @@ -19,6 +19,7 @@ import org.tmatesoft.hg.core.Nodeid; import org.tmatesoft.hg.core.SessionContext; import org.tmatesoft.hg.repo.HgRepository; +import org.tmatesoft.hg.repo.HgRuntimeException; /** * Track changes to a repository based on recent changelog revision. @@ -38,13 +39,13 @@ } // memorize the state of the repository's changelog - public void touch() { + public void touch() throws HgRuntimeException { changelogRevCount = repo.getChangelog().getRevisionCount(); changelogLastRev = safeGetRevision(changelogRevCount-1); } // if present state doesn't match the one we remember - public boolean isChanged() { + public boolean isChanged() throws HgRuntimeException { int rc = repo.getChangelog().getRevisionCount(); if (rc != changelogRevCount) { return true; @@ -54,7 +55,7 @@ } // handles empty repository case - private Nodeid safeGetRevision(int revIndex) { + private Nodeid safeGetRevision(int revIndex) throws HgRuntimeException { if (revIndex >= 0) { return repo.getChangelog().getRevision(revIndex); }