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