1 | <?php |
||
18 | class CommitMessageBuilder |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * Repository connector. |
||
23 | * |
||
24 | * @var Connector |
||
25 | */ |
||
26 | protected $repositoryConnector; |
||
27 | |||
28 | /** |
||
29 | * Revision list parser. |
||
30 | * |
||
31 | * @var RevisionListParser |
||
32 | */ |
||
33 | protected $revisionListParser; |
||
34 | |||
35 | /** |
||
36 | * Revision log factory. |
||
37 | * |
||
38 | * @var RevisionLogFactory |
||
39 | */ |
||
40 | protected $revisionLogFactory; |
||
41 | |||
42 | /** |
||
43 | * Creates commit message builder instance. |
||
44 | * |
||
45 | * @param Connector $repository_connector Repository connector. |
||
46 | * @param RevisionListParser $revision_list_parser Revision list parser. |
||
47 | * @param RevisionLogFactory $revision_log_factory Revision log factory. |
||
48 | */ |
||
49 | 6 | public function __construct( |
|
58 | |||
59 | /** |
||
60 | * Builds a commit message. |
||
61 | * |
||
62 | * @param string $wc_path Working copy path. |
||
63 | * @param string|null $changelist Changelist. |
||
64 | * @param array $recent_conflicts Recent conflicts. |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | 5 | public function build($wc_path, $changelist = null, array $recent_conflicts = array()) |
|
93 | |||
94 | /** |
||
95 | * Returns commit message fragment for merged revisions. |
||
96 | * |
||
97 | * @param string $wc_path Working copy path. |
||
98 | * |
||
99 | * @return string |
||
100 | */ |
||
101 | 5 | protected function getFragmentForMergedRevisions($wc_path) |
|
130 | |||
131 | /** |
||
132 | * Returns list of just merged revisions. |
||
133 | * |
||
134 | * @param string $wc_path Merge target: working copy path. |
||
135 | * |
||
136 | * @return array |
||
137 | */ |
||
138 | 5 | protected function getFreshMergedRevisions($wc_path) |
|
171 | |||
172 | /** |
||
173 | * Returns list of merged revisions per path. |
||
174 | * |
||
175 | * @param string $wc_path Merge target: working copy path. |
||
176 | * @param integer $revision Revision. |
||
177 | * |
||
178 | * @return array |
||
179 | */ |
||
180 | 5 | protected function getMergedRevisions($wc_path, $revision = null) |
|
194 | |||
195 | /** |
||
196 | * Builds commit message heading. |
||
197 | * |
||
198 | * @param string $wc_url Working copy url. |
||
199 | * @param string $path Source path for merge operation. |
||
200 | * |
||
201 | * @return string |
||
202 | */ |
||
203 | 2 | protected function getCommitMessageHeading($wc_url, $path) |
|
207 | |||
208 | /** |
||
209 | * Returns commit message fragment for recent conflicts. |
||
210 | * |
||
211 | * @param array $recent_conflicts Recent conflicts. |
||
212 | * |
||
213 | * @return string |
||
214 | */ |
||
215 | 5 | protected function getFragmentForRecentConflicts(array $recent_conflicts) |
|
230 | |||
231 | } |
||
232 |