1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.scm.provider.hg.command.status;
20
21 import java.io.File;
22
23 import org.apache.maven.scm.ScmException;
24 import org.apache.maven.scm.ScmFileSet;
25 import org.apache.maven.scm.ScmResult;
26 import org.apache.maven.scm.command.Command;
27 import org.apache.maven.scm.command.status.AbstractStatusCommand;
28 import org.apache.maven.scm.command.status.StatusScmResult;
29 import org.apache.maven.scm.provider.ScmProviderRepository;
30 import org.apache.maven.scm.provider.hg.HgUtils;
31 import org.apache.maven.scm.provider.hg.command.HgCommandConstants;
32
33
34
35
36 public class HgStatusCommand extends AbstractStatusCommand implements Command {
37
38 public HgStatusCommand() {
39 super();
40 }
41
42
43 public StatusScmResult executeStatusCommand(ScmProviderRepository repo, ScmFileSet fileSet) throws ScmException {
44
45 File workingDir = fileSet.getBasedir();
46 HgStatusConsumer consumer = new HgStatusConsumer(workingDir);
47 String[] statusCmd = new String[] {HgCommandConstants.STATUS_CMD};
48 ScmResult result = HgUtils.execute(consumer, workingDir, statusCmd);
49
50 return new StatusScmResult(consumer.getStatus(), result);
51 }
52 }