Skip to content

Commit 813a6ba

Browse files
committed
Merge branch 'master-1.3.x'
Conflicts: Source/MantisSourceBase.class.php SourceHgWeb/SourceHgWeb.php docs/CHANGELOG.md
2 parents 1e8407f + 5a10c0b commit 813a6ba

File tree

2 files changed

+53
-39
lines changed

2 files changed

+53
-39
lines changed

SourceHgWeb/SourceHgWeb.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class SourceHgWebPlugin extends MantisSourcePlugin {
2121

22-
const PLUGIN_VERSION = '2.1.0';
22+
const PLUGIN_VERSION = '2.1.1';
2323
const FRAMEWORK_VERSION_REQUIRED = '2.0.0';
2424

2525
/**
@@ -256,11 +256,14 @@ private function commit_changeset( $p_repo, $p_input, $p_branch='' ) {
256256
# Process changeset metadata
257257
$t_commit = array();
258258
$t_parents = array();
259-
static $s_pattern_metadata = '/^# (?:'
260-
. self::PATTERN_USER . '|'
261-
. self::PATTERN_DATE . '|'
262-
. self::PATTERN_REVISION
263-
. ')/J';
259+
static $s_pattern_metadata;
260+
if( !$s_pattern_metadata ) {
261+
$s_pattern_metadata = '/^# (?:'
262+
. self::PATTERN_USER . '|'
263+
. self::PATTERN_DATE . '|'
264+
. self::PATTERN_REVISION
265+
. ')/J';
266+
}
264267
while( true ) {
265268
$t_match = preg_match( $s_pattern_metadata, $t_input[$i], $t_metadata );
266269
if( $t_match == false ) {
@@ -309,11 +312,14 @@ private function commit_changeset( $p_repo, $p_input, $p_branch='' ) {
309312

310313
$t_changeset->author_email = empty($t_commit['author_email'])? '': $t_commit['author_email'];
311314

312-
static $s_pattern_diff = '#'
315+
static $s_pattern_diff;
316+
if( !$s_pattern_diff ) {
317+
$s_pattern_diff = '#'
313318
. self::PATTERN_DIFF . '\n('
314319
. self::PATTERN_BINARY_FILE . '|'
315320
. self::PATTERN_PLUS_MINUS
316321
. ')#u';
322+
}
317323
preg_match_all( $s_pattern_diff, $p_input, $t_matches, PREG_SET_ORDER );
318324

319325
$t_commit['files'] = array();

docs/CHANGELOG.md

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ specification.
2020

2121
- Display linked changesets and allow adding new ones on list page
2222
[#202](https://github.com/mantisbt-plugins/source-integration/pull/202)
23-
- SourceSVN documentation
23+
- SourceSVN documentation
2424
[#250](https://github.com/mantisbt-plugins/source-integration/pull/250)
2525

2626
### Changed
@@ -40,7 +40,7 @@ specification.
4040
- Only display spacer row when necessary in branch mappings list
4141
[#244](https://github.com/mantisbt-plugins/source-integration/pull/244)
4242
- Show status color box next to issue id in view page
43-
[#234](https://github.com/mantisbt-plugins/source-integration/pull/234)
43+
[#234](https://github.com/mantisbt-plugins/source-integration/pull/234)
4444
- SVN: improve error detection & handling
4545
[#247](https://github.com/mantisbt-plugins/source-integration/pull/247)
4646
- WebSVN: updated German translation
@@ -55,14 +55,14 @@ Includes all changes and fixes from 1.5.3 and 1.5.4.
5555

5656
### Added
5757

58-
- Document requirement for cURL / shell_exec
58+
- Document requirement for cURL / shell_exec
5959
[#214](https://github.com/mantisbt-plugins/source-integration/issues/214)
6060

6161
### Fixed
6262

63-
- HgWeb: replace invalid function map() by array_map()
63+
- HgWeb: replace invalid function map() by array_map()
6464
[#213](https://github.com/mantisbt-plugins/source-integration/issues/213)
65-
- Gitweb: can't retrieve changesets when protected by HTTP basic auth
65+
- Gitweb: can't retrieve changesets when protected by HTTP basic auth
6666
[#218](https://github.com/mantisbt-plugins/source-integration/issues/218)
6767

6868

@@ -72,8 +72,8 @@ Includes all changes and fixes from 1.5.2.
7272

7373
### Security
7474

75-
- CVE-2017-6958: XSS in search page
76-
[#205](https://github.com/mantisbt-plugins/source-integration/issues/205),
75+
- CVE-2017-6958: XSS in search page
76+
[#205](https://github.com/mantisbt-plugins/source-integration/issues/205),
7777
thanks to Dmitry Ivanov ([d1m0ck](https://twitter.com/d1m0ck))
7878

7979

@@ -100,12 +100,12 @@ Includes all changes and fixes from 1.5.0.
100100
### Fixed
101101

102102
- Menu options
103-
- PHP system notice and display of 'Array' under the manage menu items
103+
- PHP system notice and display of 'Array' under the manage menu items
104104
[#175](https://github.com/mantisbt-plugins/source-integration/issues/175)
105-
- Broken main menu item links
105+
- Broken main menu item links
106106
[#176](https://github.com/mantisbt-plugins/source-integration/issues/176)
107107
- Repository list alignment of type column
108-
- Source control username in account preferences
108+
- Source control username in account preferences
109109
[#180](https://github.com/mantisbt-plugins/source-integration/issues/180)
110110

111111

@@ -127,6 +127,13 @@ Includes all changes and fixes from 1.5.0.
127127

128128
# Releases for MantisBT 1.3
129129

130+
## [1.5.5] - 2018-04-09
131+
132+
### Fixed
133+
134+
- HgWeb: syntax error
135+
[#265](https://github.com/mantisbt-plugins/source-integration/pull/265)
136+
130137
## [1.5.4] - 2017-09-17
131138

132139
### Changed
@@ -140,7 +147,7 @@ Includes all changes and fixes from 1.5.0.
140147
[#238](https://github.com/mantisbt-plugins/source-integration/issues/238)
141148
- Change of repo name after full import
142149
[#245](https://github.com/mantisbt-plugins/source-integration/issues/245)
143-
- HgWeb: fix handling of commit message lines beginning with `#`
150+
- HgWeb: fix handling of commit message lines beginning with `#`
144151
[#233](https://github.com/mantisbt-plugins/source-integration/issues/233)
145152
- HgWeb: fix errors while importing the repository
146153
[#248](https://github.com/mantisbt-plugins/source-integration/issues/248)
@@ -165,21 +172,21 @@ Includes all changes and fixes from 1.5.0.
165172

166173
### Changed
167174

168-
- Source_FilterOption_Permalink() should not handle integer params as strings
175+
- Source_FilterOption_Permalink() should not handle integer params as strings
169176
[#207](https://github.com/mantisbt-plugins/source-integration/issues/207)
170177

171178
### Fixed
172179

173-
- Changeset reference is not processed when preceded by @-mention
180+
- Changeset reference is not processed when preceded by @-mention
174181
[#204](https://github.com/mantisbt-plugins/source-integration/issues/204)
175182

176183

177184
## [1.5.1] - 2017-03-06
178185

179186
### Fixed
180187

181-
- Bug preventing use of Git-based plugins on PHP versions < 5.6
182-
[#199](https://github.com/mantisbt-plugins/source-integration/issues/199)
188+
- Bug preventing use of Git-based plugins on PHP versions < 5.6
189+
[#199](https://github.com/mantisbt-plugins/source-integration/issues/199)
183190

184191
## [1.5.0] - 2017-03-06
185192

@@ -196,13 +203,13 @@ Includes all changes and fixes from 1.5.0.
196203

197204
### Changed
198205

199-
- Workaround for 4-bytes UTF-8 characters (e.g. emojis) in commit messages
206+
- Workaround for 4-bytes UTF-8 characters (e.g. emojis) in commit messages
200207
[#194](https://github.com/mantisbt-plugins/source-integration/issues/194)
201208
- Github: branch validation regex now follows rules defined in git check-ref-format man page
202209

203210
### Fixed
204211

205-
- Github: handling branches containing '/'
212+
- Github: handling branches containing '/'
206213
[#193](https://github.com/mantisbt-plugins/source-integration/issues/193)
207214

208215

@@ -225,9 +232,9 @@ scheme.
225232
### Added
226233

227234
- Support for MantisBT 1.3
228-
- Gitweb: Add support for HTTP basic auth
235+
- Gitweb: Add support for HTTP basic auth
229236
[#144](https://github.com/mantisbt-plugins/source-integration/issues/144)
230-
- Support for Pull Request linking (Bitbucket, Github)
237+
- Support for Pull Request linking (Bitbucket, Github)
231238
[#116](https://github.com/mantisbt-plugins/source-integration/issues/116)
232239
- New 'MantisSourceBase' common ancestor class
233240
- Classes hierarchy documentation
@@ -237,10 +244,10 @@ scheme.
237244
- Update MantisCore dependency to 1.3 for all child plugins
238245
- Adapt pages layout for Mantis 1.3.0
239246
- Improve layout of 'Enabled Features' in config page
240-
- Improve bug resolution and assignment logic
241-
[#80](https://github.com/mantisbt-plugins/source-integration/issues/80)
247+
- Improve bug resolution and assignment logic
248+
[#80](https://github.com/mantisbt-plugins/source-integration/issues/80)
242249
[#104](https://github.com/mantisbt-plugins/source-integration/issues/104)
243-
- Hide edit controls for unauthorized users on changeset details page
250+
- Hide edit controls for unauthorized users on changeset details page
244251
[#188](https://github.com/mantisbt-plugins/source-integration/issues/188)
245252
- Plugins title prefixed with 'Source' to group them in Mantis Plugin admin page
246253
- Set all plugins' URL to point Github's page
@@ -253,23 +260,23 @@ scheme.
253260
### Fixed
254261

255262
- Javascript change event on search page
256-
- Data type mismatch error on edit page
263+
- Data type mismatch error on edit page
257264
[#134](https://github.com/mantisbt-plugins/source-integration/issues/134)
258-
- Changeset linking
259-
[#146](https://github.com/mantisbt-plugins/source-integration/issues/146),
265+
- Changeset linking
266+
[#146](https://github.com/mantisbt-plugins/source-integration/issues/146),
260267
[#161](https://github.com/mantisbt-plugins/source-integration/issues/161)
261-
- Set issue resolution to 'fixed' when processing changesets
268+
- Set issue resolution to 'fixed' when processing changesets
262269
[#191](https://github.com/mantisbt-plugins/source-integration/issues/191)
263-
- Cgit: filter out decoration tag from commit message
270+
- Cgit: filter out decoration tag from commit message
264271
[#185](https://github.com/mantisbt-plugins/source-integration/issues/185)
265-
- GitHub: system notice when authorizing application
272+
- GitHub: system notice when authorizing application
266273
[#168](https://github.com/mantisbt-plugins/source-integration/issues/168)
267-
- GitHub: allow clearing OAuth access token
274+
- GitHub: allow clearing OAuth access token
268275
[#133](https://github.com/mantisbt-plugins/source-integration/issues/133)
269276
- GitLab: Remove calls to deprecated helper_alternate_class()
270-
- SVN: prevent Data Type mismatch error in config page
277+
- SVN: prevent Data Type mismatch error in config page
271278
[#167](https://github.com/mantisbt-plugins/source-integration/issues/167)
272-
- SVN: force SourceSVN plugin in svn_call
279+
- SVN: force SourceSVN plugin in svn_call
273280
[#186](https://github.com/mantisbt-plugins/source-integration/issues/186)
274281

275282

@@ -314,7 +321,7 @@ Includes all changes and fixes from master-1.2.x branch, up to commit
314321

315322

316323
[Unreleased 2.x]: https://github.com/mantisbt-plugins/source-integration/compare/v2.1.0...HEAD
317-
[Unreleased 1.x]: https://github.com/mantisbt-plugins/source-integration/compare/v1.5.3...master-1.3.x
324+
[Unreleased 1.x]: https://github.com/mantisbt-plugins/source-integration/compare/v1.5.5...master-1.3.x
318325

319326
[2.1.0]: https://github.com/mantisbt-plugins/source-integration/compare/v2.0.3...v2.1.0
320327
[2.0.3]: https://github.com/mantisbt-plugins/source-integration/compare/v2.0.2...v2.0.3
@@ -324,6 +331,7 @@ Includes all changes and fixes from master-1.2.x branch, up to commit
324331
[2.0.0-beta.2]: https://github.com/mantisbt-plugins/source-integration/compare/v2.0.0-beta.1...v2.0.0-beta.2
325332
[2.0.0-beta.1]: https://github.com/mantisbt-plugins/source-integration/compare/v1.5.2...v2.0.0-beta.1
326333

334+
[1.5.5]: https://github.com/mantisbt-plugins/source-integration/compare/v1.5.4...v1.5.5
327335
[1.5.4]: https://github.com/mantisbt-plugins/source-integration/compare/v1.5.3...v1.5.4
328336
[1.5.3]: https://github.com/mantisbt-plugins/source-integration/compare/v1.5.2...v1.5.3
329337
[1.5.2]: https://github.com/mantisbt-plugins/source-integration/compare/v1.5.1...v1.5.2

0 commit comments

Comments
 (0)