diff src/org/tmatesoft/hg/core/HgBlameInspector.java @ 709:497e697636fc

Report merged lines as changed block if possible, not as a sequence of added/deleted blocks. To facilitate access to merge parent lines AddBlock got mergeLineAt() method that reports index of the line in the second parent (if any), while insertedAt() has been changed to report index in the first parent always
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 21 Aug 2013 16:23:27 +0200
parents 5f52074707b2
children
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgBlameInspector.java	Tue Aug 20 18:41:34 2013 +0200
+++ b/src/org/tmatesoft/hg/core/HgBlameInspector.java	Wed Aug 21 16:23:27 2013 +0200
@@ -150,9 +150,13 @@
 	
 	public interface AddBlock extends Block {
 		/**
-		 * @return line index in the origin where this block is inserted
+		 * @return line index in the origin (first parent in case of merge) where this block is inserted
 		 */
-		int insertedAt();  
+		int insertedAt();
+		/**
+		 * @return line index in the second (merge) parent, if this block comes into target as a result of a merge, or -1 otherwise. 
+		 */
+		int mergeLineAt();
 		/**
 		 * @return line index of the first added line in the target revision
 		 */