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 super(repository, null);
14 }
15
16
17
18
19
20
21
22 public GenericLogCommand style(String style) {
23 cmdAppend("--style", pathToStyle(style));
24 return this;
25 }
26
27
28
29
30
31
32
33 public GenericLogCommand template(String template) {
34 cmdAppend("--template", template);
35 return this;
36 }
37
38 private String pathToStyle(String style) {
39 return Utils.resourceAsFile("/styles/" + style + ".style").getAbsolutePath();
40 }
41
42 public HgInputStream stream(String... args) {
43 return launchStream(args);
44 }
45
46 }