comparison 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
comparison
equal deleted inserted replaced
708:4ffc17c0b534 709:497e697636fc
148 BlockData content(); 148 BlockData content();
149 } 149 }
150 150
151 public interface AddBlock extends Block { 151 public interface AddBlock extends Block {
152 /** 152 /**
153 * @return line index in the origin where this block is inserted 153 * @return line index in the origin (first parent in case of merge) where this block is inserted
154 */ 154 */
155 int insertedAt(); 155 int insertedAt();
156 /**
157 * @return line index in the second (merge) parent, if this block comes into target as a result of a merge, or -1 otherwise.
158 */
159 int mergeLineAt();
156 /** 160 /**
157 * @return line index of the first added line in the target revision 161 * @return line index of the first added line in the target revision
158 */ 162 */
159 int firstAddedLine(); 163 int firstAddedLine();
160 /** 164 /**