1 | |
package org.apache.maven.scm.provider.hg.command.info; |
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
import org.apache.maven.scm.CommandParameters; |
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.AbstractCommand; |
27 | |
import org.apache.maven.scm.command.Command; |
28 | |
import org.apache.maven.scm.command.info.InfoScmResult; |
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 | |
|
37 | 0 | public class HgInfoCommand |
38 | |
extends AbstractCommand |
39 | |
implements Command |
40 | |
{ |
41 | |
|
42 | |
@Override |
43 | |
protected ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet, |
44 | |
CommandParameters parameters ) |
45 | |
throws ScmException |
46 | |
{ |
47 | 0 | String[] revCmd = new String[]{ HgCommandConstants.REVNO_CMD, "-i" }; |
48 | 0 | HgInfoConsumer consumer = new HgInfoConsumer( getLogger() ); |
49 | 0 | ScmResult scmResult = HgUtils.execute( consumer, getLogger(), fileSet.getBasedir(), revCmd ); |
50 | 0 | return new InfoScmResult( consumer.getInfoItems(), scmResult ); |
51 | |
} |
52 | |
|
53 | |
} |