Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/LineImpl.java @ 676:3219cfadda49
Switch to alternative annotate producer (walks from parents to children). Refactor FileAnnotation to match updated annotate approach
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Thu, 18 Jul 2013 18:03:51 +0200 |
| parents | |
| children | 1c49c0cee540 |
comparison
equal
deleted
inserted
replaced
| 675:a20121a2bba6 | 676:3219cfadda49 |
|---|---|
| 1 /* | |
| 2 * Copyright (c) 2013 TMate Software Ltd | |
| 3 * | |
| 4 * This program is free software; you can redistribute it and/or modify | |
| 5 * it under the terms of the GNU General Public License as published by | |
| 6 * the Free Software Foundation; version 2 of the License. | |
| 7 * | |
| 8 * This program is distributed in the hope that it will be useful, | |
| 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 11 * GNU General Public License for more details. | |
| 12 * | |
| 13 * For information on how to redistribute this software under | |
| 14 * the terms of a license other than GNU General Public License | |
| 15 * contact TMate Software at support@hg4j.com | |
| 16 */ | |
| 17 package org.tmatesoft.hg.internal; | |
| 18 | |
| 19 import org.tmatesoft.hg.core.HgAnnotateCommand.LineInfo; | |
| 20 | |
| 21 /** | |
| 22 * @author Artem Tikhomirov | |
| 23 * @author TMate Software Ltd. | |
| 24 */ | |
| 25 final class LineImpl implements LineInfo { | |
| 26 private int ln; | |
| 27 private int rev; | |
| 28 private byte[] content; | |
| 29 | |
| 30 void init(int line, int csetRev, byte[] cnt) { | |
| 31 ln = line; | |
| 32 rev = csetRev; | |
| 33 content = cnt; | |
| 34 } | |
| 35 | |
| 36 public int getLineNumber() { | |
| 37 return ln; | |
| 38 } | |
| 39 | |
| 40 public int getChangesetIndex() { | |
| 41 return rev; | |
| 42 } | |
| 43 | |
| 44 public byte[] getContent() { | |
| 45 return content; | |
| 46 } | |
| 47 } |
