diff src/org/tmatesoft/hg/internal/FileAnnotation.java @ 560:52263817b998

Exception when no blocks from merged revision were reported and merge parent was not recorded for future use
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 26 Feb 2013 21:06:43 +0100
parents 154718ae23ed
children 6fbca6506bb5
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/FileAnnotation.java	Mon Feb 25 19:48:20 2013 +0100
+++ b/src/org/tmatesoft/hg/internal/FileAnnotation.java	Tue Feb 26 21:06:43 2013 +0100
@@ -110,6 +110,11 @@
 		} else {
 			equalRanges.put(rd.originChangesetIndex(), v);
 		}
+		if (rd.isMerge() && !mergedRanges.containsKey(rd.mergeChangesetIndex())) {
+			// seen merge, but no lines were merged from p2.
+			// Add empty range to avoid uncertainty when a parent of p2 pops in
+			mergedRanges.put(rd.mergeChangesetIndex(), new RangeSeq());
+		}
 		intermediateEquals.clear();
 		activeEquals = null;
 		activeEqualsComesFromMerge = false;