Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/diff/ReverseAnnotateInspector.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 | 7839ff0bfd78 |
children |
comparison
equal
deleted
inserted
replaced
708:4ffc17c0b534 | 709:497e697636fc |
---|---|
143 } | 143 } |
144 for (int i = 0, ln = block.firstAddedLine(), x = block.totalAddedLines(); i < x; i++, ln++) { | 144 for (int i = 0, ln = block.firstAddedLine(), x = block.totalAddedLines(); i < x; i++, ln++) { |
145 int lnInFinal = activeEquals.mapLineIndex(ln); | 145 int lnInFinal = activeEquals.mapLineIndex(ln); |
146 if (lnInFinal != -1/* && !knownLines[lnInFinal]*/) { | 146 if (lnInFinal != -1/* && !knownLines[lnInFinal]*/) { |
147 if (rs != null) { | 147 if (rs != null) { |
148 rs.add(block.insertedAt() + i, lnInFinal, 1); | 148 rs.add(block.mergeLineAt() + i, lnInFinal, 1); |
149 } else { | 149 } else { |
150 line(lnInFinal, ln, block.targetChangesetIndex()); | 150 line(lnInFinal, ln, block.targetChangesetIndex()); |
151 } | 151 } |
152 knownLines[lnInFinal] = true; | 152 knownLines[lnInFinal] = true; |
153 } | 153 } |