1 package org.apache.maven.scm.provider.bazaar.command.blame;
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.ScmException;
23 import org.apache.maven.scm.ScmFileSet;
24 import org.apache.maven.scm.ScmResult;
25 import org.apache.maven.scm.command.blame.AbstractBlameCommand;
26 import org.apache.maven.scm.command.blame.BlameScmResult;
27 import org.apache.maven.scm.provider.ScmProviderRepository;
28 import org.apache.maven.scm.provider.bazaar.BazaarUtils;
29
30
31
32
33
34
35 public class BazaarBlameCommand
36 extends AbstractBlameCommand
37 {
38 public static final String BLAME_CMD = "blame";
39
40
41
42
43 public BlameScmResult executeBlameCommand( ScmProviderRepository repo, ScmFileSet workingDirectory,
44 String filename )
45 throws ScmException
46 {
47 String[] cmd = new String[]{BLAME_CMD, "--all",
48 "--long",
49 filename};
50 BazaarBlameConsumer consumer = new BazaarBlameConsumer( getLogger() );
51 ScmResult result = BazaarUtils.execute( consumer, getLogger(), workingDirectory.getBasedir(), cmd );
52 return new BlameScmResult( consumer.getLines(), result );
53 }
54 }