Skip to content

Commit f74fd14

Browse files
authored
Merge branch 'php:master' into LOOSE_SKIP_REVCHECK
2 parents c654945 + df44b2d commit f74fd14

File tree

6 files changed

+98
-138
lines changed

6 files changed

+98
-138
lines changed

configure.php

-2
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,6 @@ function getFileModificationHistory(): array {
635635
// Notice how doing it this way results in generating less than half as many files.
636636
$infiles = array(
637637
'manual.xml.in',
638-
'install-unix.xml.in',
639-
'install-win.xml.in',
640638
'scripts/file-entities.php.in',
641639
);
642640

entities/global.ent

+1-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@
403403
<!ENTITY url.rec-xml "http://www.w3.org/TR/1998/REC-xml-19980210">
404404
<!ENTITY url.relaxng "http://www.relaxng.org/">
405405
<!-- linking to specific rfcs is done like so: &url.rfc;xxxx so for example &url.rfc;2042 -->
406-
<!ENTITY url.rfc 'http://www.faqs.org/rfcs/rfc'>
406+
<!ENTITY url.rfc "https://datatracker.ietf.org/doc/html/rfc">
407407
<!ENTITY url.rnp "https://www.rnpgp.org/">
408408
<!ENTITY url.iana.system-names 'http://www.iana.org/assignments/operating-system-names'>
409409
<!ENTITY url.rpmfind "http://www.rpmfind.net/">

install-unix.xml.in

-40
This file was deleted.

install-win.xml.in

-95
This file was deleted.

scripts/qa/section-order.php

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
'reference/oci8/oldaliases/ocifetchinto.xml',
4141
/* This page uses <xi:include> tags to include the docs from the OO version */
4242
'reference/parallel/functions/parallel.run.xml',
43+
/* This page uses <xi:include> tags to include the docs from the OO version */
44+
'reference/pdo/pdo/connect.xml',
4345
/* These pages use <xi:include> tags to include the docs from the interface version */
4446
'reference/dom/domcharacterdata/after.xml',
4547
'reference/dom/domcharacterdata/remove.xml',

scripts/translation/lib/GitLogParser.php

+95
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,101 @@ static function parseDir( string $gdir , RevcheckFileList $list )
107107
$proc->skip(); // Empty Line
108108
}
109109
}
110+
111+
static function parseDir( string $gdir , RevcheckFileList $list )
112+
{
113+
$gdir = escapeshellarg( $gdir );
114+
$proc = new GitLogParserProc( "git -C $gdir log --name-only" );
115+
116+
$hash = "";
117+
$date = "";
118+
$skip = false;
119+
$lcnt = 0;
120+
121+
while ( $proc->live )
122+
{
123+
// Hash
124+
125+
if ( str_starts_with( $proc->line , "commit " ) )
126+
{
127+
$hash = trim( substr( $proc->line , 7 ) );
128+
$date = "";
129+
$skip = false;
130+
$lcnt = 0;
131+
$proc->next();
132+
}
133+
else
134+
throw new Exception( "Expected commit hash." );
135+
136+
// Headers
137+
138+
while ( $proc->live && strlen( trim( $proc->line ) ) > 0 )
139+
{
140+
// Date
141+
if ( str_starts_with( $proc->line , 'Date:' ) )
142+
{
143+
$line = trim( substr( $proc->line , 5 ) );
144+
$date = strtotime( $line );
145+
$proc->next();
146+
continue;
147+
}
148+
// Other headers
149+
if ( $proc->line[0] != ' ' && strpos( $proc->line , ':' ) > 0 )
150+
{
151+
$proc->next();
152+
continue;
153+
}
154+
break;
155+
}
156+
157+
$proc->skip(); // Empty Line
158+
159+
// Message
160+
161+
while ( $proc->live && str_starts_with( $proc->line , ' ' ) )
162+
{
163+
if ( LOOSE_SKIP_REVCHECK ) // https://github.com/php/doc-base/pull/132
164+
{
165+
// Messages that contains [skip-revcheck] flags entire commit as ignored.
166+
if ( str_contains( $proc->line , '[skip-revcheck]' ) )
167+
$skip = true;
168+
}
169+
else
170+
{
171+
// Messages that start with [skip-revcheck] flags entire commit as ignored.
172+
$lcnt++;
173+
if ( $lcnt == 1 && str_starts_with( trim( $line ) , '[skip-revcheck]' ) )
174+
$skip = true;
175+
}
176+
$proc->next();
177+
}
178+
179+
$proc->skip(); // Empty Line
180+
181+
// Merge commits and empty files commits
182+
183+
// Merge commits are not followed with file listings.
184+
// Some normal commits also not have file listings
185+
// (see b73609198d4606621f57e165efc457f30e403217).
186+
187+
if ( str_starts_with( $proc->line , "commit " ) )
188+
continue;
189+
190+
// Files
191+
192+
while ( $proc->live && strlen( trim( $proc->line ) ) > 0 )
193+
{
194+
$file = $list->get( trim( $proc->line ) );
195+
196+
if ( $file != null )
197+
$file->addGitLogData( $hash , $date , $skip );
198+
199+
$proc->next();
200+
}
201+
202+
$proc->skip(); // Empty Line
203+
}
204+
}
110205
}
111206

112207
class GitLogParserProc

0 commit comments

Comments
 (0)