comparison src/org/tmatesoft/hg/core/HgDiffCommand.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
252 checkFile(); 252 checkFile();
253 final ProgressSupport progress = getProgressSupport(insp); 253 final ProgressSupport progress = getProgressSupport(insp);
254 progress.start(2); 254 progress.start(2);
255 try { 255 try {
256 final CancelSupport cancel = getCancelSupport(insp, true); 256 final CancelSupport cancel = getCancelSupport(insp, true);
257 int changelogRevisionIndex = clogRevIndexEnd.get(); 257 int changelogRevisionIndex = clogRevIndexEnd.get(TIP);
258 // TODO detect if file is text/binary (e.g. looking for chars < ' ' and not \t\r\n\f 258 // TODO detect if file is text/binary (e.g. looking for chars < ' ' and not \t\r\n\f
259 int fileRevIndex = fileRevIndex(df, changelogRevisionIndex); 259 int fileRevIndex = fileRevIndex(df, changelogRevisionIndex);
260 int[] fileRevParents = new int[2]; 260 int[] fileRevParents = new int[2];
261 df.parents(fileRevIndex, fileRevParents, null, null); 261 df.parents(fileRevIndex, fileRevParents, null, null);
262 if (changelogRevisionIndex == TIP) { 262 if (changelogRevisionIndex == TIP) {