comparison src/org/tmatesoft/hg/internal/LineImpl.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 3219cfadda49
children
comparison
equal deleted inserted replaced
676:3219cfadda49 677:1c49c0cee540
22 * @author Artem Tikhomirov 22 * @author Artem Tikhomirov
23 * @author TMate Software Ltd. 23 * @author TMate Software Ltd.
24 */ 24 */
25 final class LineImpl implements LineInfo { 25 final class LineImpl implements LineInfo {
26 private int ln; 26 private int ln;
27 private int origLine;
27 private int rev; 28 private int rev;
28 private byte[] content; 29 private byte[] content;
29 30
30 void init(int line, int csetRev, byte[] cnt) { 31 void init(int line, int firstAppearance, int csetRev, byte[] cnt) {
31 ln = line; 32 ln = line;
33 origLine = firstAppearance;
32 rev = csetRev; 34 rev = csetRev;
33 content = cnt; 35 content = cnt;
34 } 36 }
35 37
36 public int getLineNumber() { 38 public int getLineNumber() {
37 return ln; 39 return ln;
40 }
41
42
43 public int getOriginLineNumber() {
44 return origLine;
38 } 45 }
39 46
40 public int getChangesetIndex() { 47 public int getChangesetIndex() {
41 return rev; 48 return rev;
42 } 49 }