Mercurial > hg4j
comparison test/org/tmatesoft/hg/test/TestStatus.java @ 127:2e395db595e2
Moved HgStatus to toplevel
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 16 Feb 2011 18:42:10 +0100 |
parents | dd4d2d0e42cd |
children | aa1629f36482 |
comparison
equal
deleted
inserted
replaced
126:b92a638764be | 127:2e395db595e2 |
---|---|
15 * contact TMate Software at support@hg4j.com | 15 * contact TMate Software at support@hg4j.com |
16 */ | 16 */ |
17 package org.tmatesoft.hg.test; | 17 package org.tmatesoft.hg.test; |
18 | 18 |
19 import static org.hamcrest.CoreMatchers.equalTo; | 19 import static org.hamcrest.CoreMatchers.equalTo; |
20 import static org.tmatesoft.hg.core.StatusCommand.HgStatus.Kind.*; | 20 import static org.tmatesoft.hg.core.HgStatus.*; |
21 import static org.tmatesoft.hg.core.HgStatus.Kind.*; | |
21 import static org.tmatesoft.hg.repo.HgRepository.TIP; | 22 import static org.tmatesoft.hg.repo.HgRepository.TIP; |
22 | 23 |
23 import java.util.Collection; | 24 import java.util.Collection; |
24 import java.util.Collections; | 25 import java.util.Collections; |
25 import java.util.HashMap; | 26 import java.util.HashMap; |
29 import java.util.TreeMap; | 30 import java.util.TreeMap; |
30 | 31 |
31 import org.junit.Assume; | 32 import org.junit.Assume; |
32 import org.junit.Rule; | 33 import org.junit.Rule; |
33 import org.junit.Test; | 34 import org.junit.Test; |
35 import org.tmatesoft.hg.core.HgStatus; | |
34 import org.tmatesoft.hg.core.Path; | 36 import org.tmatesoft.hg.core.Path; |
35 import org.tmatesoft.hg.core.StatusCommand; | 37 import org.tmatesoft.hg.core.StatusCommand; |
36 import org.tmatesoft.hg.core.StatusCommand.HgStatus; | |
37 import org.tmatesoft.hg.core.StatusCommand.HgStatus.Kind; | |
38 import org.tmatesoft.hg.repo.HgLookup; | 38 import org.tmatesoft.hg.repo.HgLookup; |
39 import org.tmatesoft.hg.repo.HgRepository; | 39 import org.tmatesoft.hg.repo.HgRepository; |
40 import org.tmatesoft.hg.repo.HgStatusCollector; | 40 import org.tmatesoft.hg.repo.HgStatusCollector; |
41 import org.tmatesoft.hg.repo.HgWorkingCopyStatusCollector; | 41 import org.tmatesoft.hg.repo.HgWorkingCopyStatusCollector; |
42 | 42 |
124 | 124 |
125 // TODO check not -A, but defaults()/custom set of modifications | 125 // TODO check not -A, but defaults()/custom set of modifications |
126 } | 126 } |
127 | 127 |
128 private static class StatusCollector implements StatusCommand.Handler { | 128 private static class StatusCollector implements StatusCommand.Handler { |
129 private final Map<StatusCommand.HgStatus.Kind, List<Path>> map = new TreeMap<StatusCommand.HgStatus.Kind, List<Path>>(); | 129 private final Map<HgStatus.Kind, List<Path>> map = new TreeMap<HgStatus.Kind, List<Path>>(); |
130 | 130 |
131 public void handleStatus(HgStatus s) { | 131 public void handleStatus(HgStatus s) { |
132 List<Path> l = map.get(s.getKind()); | 132 List<Path> l = map.get(s.getKind()); |
133 if (l == null) { | 133 if (l == null) { |
134 l = new LinkedList<Path>(); | 134 l = new LinkedList<Path>(); |