changeset 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 6ca3d0c5b4bc
children d3c71498919c
files src/org/tmatesoft/hg/internal/FileAnnotation.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
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;