comparison src/org/tmatesoft/hg/core/StatusCommand.java @ 74:6f1b88693d48

Complete refactoring to org.tmatesoft
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 24 Jan 2011 03:14:45 +0100
parents 0e499fed9b3d
children d55d4eedfc57
comparison
equal deleted inserted replaced
73:0d279bcc4442 74:6f1b88693d48
14 * the terms of a license other than GNU General Public License 14 * the terms of a license other than GNU General Public License
15 * contact TMate Software at support@svnkit.com 15 * contact TMate Software at support@svnkit.com
16 */ 16 */
17 package org.tmatesoft.hg.core; 17 package org.tmatesoft.hg.core;
18 18
19 import static com.tmate.hgkit.ll.HgRepository.BAD_REVISION; 19 import static org.tmatesoft.hg.repo.HgRepository.BAD_REVISION;
20 import static com.tmate.hgkit.ll.HgRepository.TIP; 20 import static org.tmatesoft.hg.repo.HgRepository.TIP;
21 import static com.tmate.hgkit.ll.HgRepository.WORKING_COPY; 21 import static org.tmatesoft.hg.repo.HgRepository.WORKING_COPY;
22 22
23 import org.tmatesoft.hg.core.Path.Matcher; 23 import org.tmatesoft.hg.core.Path.Matcher;
24 import org.tmatesoft.hg.util.PathPool; 24 import org.tmatesoft.hg.repo.HgRepository;
25 25 import org.tmatesoft.hg.repo.StatusCollector;
26 import com.tmate.hgkit.fs.FileWalker; 26 import org.tmatesoft.hg.repo.WorkingCopyStatusCollector;
27 import com.tmate.hgkit.ll.HgRepository;
28 import com.tmate.hgkit.ll.LocalHgRepo;
29 import com.tmate.hgkit.ll.StatusCollector;
30 import com.tmate.hgkit.ll.WorkingCopyStatusCollector;
31 import com.tmate.hgkit.ll.StatusCollector.Record;
32 27
33 /** 28 /**
34 * 29 *
35 * @author Artem Tikhomirov 30 * @author Artem Tikhomirov
36 * @author TMate Software Ltd. 31 * @author TMate Software Ltd.
142 public void execute(StatusCollector.Inspector inspector) { 137 public void execute(StatusCollector.Inspector inspector) {
143 StatusCollector sc = new StatusCollector(repo); // TODO from CommandContext 138 StatusCollector sc = new StatusCollector(repo); // TODO from CommandContext
144 // StatusCollector.Record r = new StatusCollector.Record(); // XXX use own inspector not to collect entries that 139 // StatusCollector.Record r = new StatusCollector.Record(); // XXX use own inspector not to collect entries that
145 // are not interesting or do not match name 140 // are not interesting or do not match name
146 if (endRevision == WORKING_COPY) { 141 if (endRevision == WORKING_COPY) {
147 WorkingCopyStatusCollector wcsc = new WorkingCopyStatusCollector(repo, ((LocalHgRepo) repo).createWorkingDirWalker()); 142 WorkingCopyStatusCollector wcsc = new WorkingCopyStatusCollector(repo);
148 wcsc.setBaseRevisionCollector(sc); 143 wcsc.setBaseRevisionCollector(sc);
149 wcsc.walk(startRevision, inspector); 144 wcsc.walk(startRevision, inspector);
150 } else { 145 } else {
151 if (startRevision == TIP) { 146 if (startRevision == TIP) {
152 sc.change(endRevision, inspector); 147 sc.change(endRevision, inspector);