diff src/org/tmatesoft/hg/internal/ChangelogHelper.java @ 247:f052f40839ec

Issue 9: NPE in getModificationDate for files with status 'Unknown'
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 12 Aug 2011 17:17:37 +0200
parents ba2bf656f00f
children 5f9073eabf06
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/ChangelogHelper.java	Thu Aug 11 05:12:13 2011 +0200
+++ b/src/org/tmatesoft/hg/internal/ChangelogHelper.java	Fri Aug 12 17:17:37 2011 +0200
@@ -60,6 +60,9 @@
 	 */
 	public RawChangeset findLatestChangeWith(Path file) {
 		HgDataFile df = repo.getFileNode(file);
+		if (!df.exists()) {
+			return null;
+		}
 		int changelogRev = df.getChangesetLocalRevision(HgRepository.TIP);
 		if (changelogRev >= leftBoundary) {
 			// the method is likely to be invoked for different files,