Mercurial > hg4j
comparison src/org/tmatesoft/hg/core/Cset.java @ 94:af1f3b78b918
*StatusCollector renamed to Hg*StatusCollector
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Thu, 27 Jan 2011 21:18:47 +0100 |
| parents | d55d4eedfc57 |
| children | a3a2e5deb320 |
comparison
equal
deleted
inserted
replaced
| 93:d55d4eedfc57 | 94:af1f3b78b918 |
|---|---|
| 21 import java.util.List; | 21 import java.util.List; |
| 22 | 22 |
| 23 import org.tmatesoft.hg.core.LogCommand.FileRevision; | 23 import org.tmatesoft.hg.core.LogCommand.FileRevision; |
| 24 import org.tmatesoft.hg.repo.Changeset; | 24 import org.tmatesoft.hg.repo.Changeset; |
| 25 import org.tmatesoft.hg.repo.HgRepository; | 25 import org.tmatesoft.hg.repo.HgRepository; |
| 26 import org.tmatesoft.hg.repo.StatusCollector; | 26 import org.tmatesoft.hg.repo.HgStatusCollector; |
| 27 import org.tmatesoft.hg.util.PathPool; | 27 import org.tmatesoft.hg.util.PathPool; |
| 28 | 28 |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * TODO rename to Changeset along with original Changeset moved to .repo and renamed to HgChangeset? | 31 * TODO rename to Changeset along with original Changeset moved to .repo and renamed to HgChangeset? |
| 33 * | 33 * |
| 34 * @author Artem Tikhomirov | 34 * @author Artem Tikhomirov |
| 35 * @author TMate Software Ltd. | 35 * @author TMate Software Ltd. |
| 36 */ | 36 */ |
| 37 public class Cset implements Cloneable { | 37 public class Cset implements Cloneable { |
| 38 private final StatusCollector statusHelper; | 38 private final HgStatusCollector statusHelper; |
| 39 private final PathPool pathHelper; | 39 private final PathPool pathHelper; |
| 40 | 40 |
| 41 // | 41 // |
| 42 private Changeset changeset; | 42 private Changeset changeset; |
| 43 private Nodeid nodeid; | 43 private Nodeid nodeid; |
| 47 private List<Path> deletedFiles; | 47 private List<Path> deletedFiles; |
| 48 private int revNumber; | 48 private int revNumber; |
| 49 | 49 |
| 50 // XXX consider CommandContext with StatusCollector, PathPool etc. Commands optionally get CC through a cons or create new | 50 // XXX consider CommandContext with StatusCollector, PathPool etc. Commands optionally get CC through a cons or create new |
| 51 // and pass it around | 51 // and pass it around |
| 52 /*package-local*/Cset(StatusCollector statusCollector, PathPool pathPool) { | 52 /*package-local*/Cset(HgStatusCollector statusCollector, PathPool pathPool) { |
| 53 statusHelper = statusCollector; | 53 statusHelper = statusCollector; |
| 54 pathHelper = pathPool; | 54 pathHelper = pathPool; |
| 55 } | 55 } |
| 56 | 56 |
| 57 /*package-local*/ | 57 /*package-local*/ |
| 130 | 130 |
| 131 private /*synchronized*/ void initFileChanges() { | 131 private /*synchronized*/ void initFileChanges() { |
| 132 ArrayList<Path> deleted = new ArrayList<Path>(); | 132 ArrayList<Path> deleted = new ArrayList<Path>(); |
| 133 ArrayList<FileRevision> modified = new ArrayList<FileRevision>(); | 133 ArrayList<FileRevision> modified = new ArrayList<FileRevision>(); |
| 134 ArrayList<FileRevision> added = new ArrayList<FileRevision>(); | 134 ArrayList<FileRevision> added = new ArrayList<FileRevision>(); |
| 135 StatusCollector.Record r = new StatusCollector.Record(); | 135 HgStatusCollector.Record r = new HgStatusCollector.Record(); |
| 136 statusHelper.change(revNumber, r); | 136 statusHelper.change(revNumber, r); |
| 137 final HgRepository repo = statusHelper.getRepo(); | 137 final HgRepository repo = statusHelper.getRepo(); |
| 138 for (Path s : r.getModified()) { | 138 for (Path s : r.getModified()) { |
| 139 Nodeid nid = r.nodeidAfterChange(s); | 139 Nodeid nid = r.nodeidAfterChange(s); |
| 140 if (nid == null) { | 140 if (nid == null) { |
