[DOC-WEB] [web-doc] master: [skip-revcheck] is not a magic wand that keeps your outdated files up to date.

1 view
Skip to first unread message

Nilgün Belma Bugüner

unread,
Nov 10, 2021, 4:01:13 AM11/10/21
to doc...@lists.php.net
Author: Nilgün Belma Bugüner (nilgun)
Date: 2021-11-10T12:01:01+03:00

Commit: https://github.com/php/web-doc/commit/969aca70ce272cb932d966ba6d03cd19b7391f8e
Raw diff: https://github.com/php/web-doc/commit/969aca70ce272cb932d966ba6d03cd19b7391f8e.diff

[skip-revcheck] is not a magic wand that keeps your outdated files up to date.

Changed paths:
M scripts/rev.php


Diff:

diff --git a/scripts/rev.php b/scripts/rev.php
index 11d4159..e8a8b57 100644
--- a/scripts/rev.php
+++ b/scripts/rev.php
@@ -515,8 +515,14 @@ function captureGitValues( & $output )
}
if ( $trFile->completion != null && $trFile->completion != "ready" )
$trFile->syncStatus = FileStatusEnum::TranslatedWip;
- if ( $en->skip )
- $trFile->syncStatus = FileStatusEnum::TranslatedOk;
+ if ( $en->skip ) {
+ $cwd = getcwd();
+ chdir( $DOCS . 'en' );
+ $hashes = explode ( "\n" , `git log -2 --format=%H -- {$filename}` );
+ chdir( $cwd );
+ if ( $hashes[1] == $trFile->hash )
+ $trFile->syncStatus = FileStatusEnum::TranslatedOk;
+ }
$SQL_BUFF .= "INSERT INTO translated VALUES ($id, '$lang',
'$en->name', '$trFile->hash', $size, '$trFile->maintainer',
'$trFile->completion', '$trFile->syncStatus');\n";

--
Documentation Website Mailing List (http://doc.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply all
Reply to author
Forward
0 new messages