1 | |
package com.aragost.javahg.internals; |
2 | |
|
3 | |
import com.aragost.javahg.Repository; |
4 | |
import com.aragost.javahg.commands.LogCommand; |
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
public class GenericLogCommand extends LogCommand { |
11 | |
|
12 | |
public GenericLogCommand(Repository repository) { |
13 | 27 | super(repository, null); |
14 | 27 | } |
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
public GenericLogCommand style(String style) { |
23 | 12 | cmdAppend("--style", pathToStyle(style)); |
24 | 12 | return this; |
25 | |
} |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
public GenericLogCommand template(String template) { |
34 | 15 | cmdAppend("--template", template); |
35 | 15 | return this; |
36 | |
} |
37 | |
|
38 | |
private String pathToStyle(String style) { |
39 | 12 | return Utils.resourceAsFile("/styles/" + style + ".style").getAbsolutePath(); |
40 | |
} |
41 | |
|
42 | |
public HgInputStream stream(String... args) { |
43 | 27 | return launchStream(args); |
44 | |
} |
45 | |
|
46 | |
} |