comparison cmdline/org/tmatesoft/hg/console/Annotate.java @ 677:1c49c0cee540

Report line number at the first appearance, like 'hg annotate -l' does
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 18 Jul 2013 18:47:45 +0200
parents c4fd1037bc6f
children
comparison
equal deleted inserted replaced
676:3219cfadda49 677:1c49c0cee540
58 lineNumbers = printLineNumbers; 58 lineNumbers = printLineNumbers;
59 } 59 }
60 60
61 public void next(LineInfo lineInfo) { 61 public void next(LineInfo lineInfo) {
62 if (lineNumbers) { 62 if (lineNumbers) {
63 System.out.printf("%3d:%3d: %s", lineInfo.getChangesetIndex(), lineInfo.getLineNumber(), new String(lineInfo.getContent())); 63 System.out.printf("%3d:%3d: %s", lineInfo.getChangesetIndex(), lineInfo.getOriginLineNumber(), new String(lineInfo.getContent()));
64 } else { 64 } else {
65 System.out.printf("%3d: %s", lineInfo.getChangesetIndex(), new String(lineInfo.getContent())); 65 System.out.printf("%3d: %s", lineInfo.getChangesetIndex(), new String(lineInfo.getContent()));
66 } 66 }
67 } 67 }
68 } 68 }