actualizare

This commit is contained in:
2026-08-03 08:30:21 +03:00
parent 7f06f3ca4c
commit 9b6671b0ed
3 changed files with 17 additions and 95 deletions

View File

@@ -24,8 +24,9 @@
Esec partial: la esecul unui fisier continua cu restul, colecteaza esecurile, le raporteaza la
final si iese cu exit code nenul.
Curatare orfani: textele .??2 fara binar corespondent (binar sters din SVN) se sterg si se
raporteaza; la fel .db2-urile ale caror tabele au IESIT din lista -DbfList.
Curatare orfani: textele .??2 fara binar corespondent (binar sters din SVN) si .db2-urile ale
caror tabele au IESIT din lista -DbfList sunt DOAR RAPORTATE implicit; se sterg numai cu
-OrphanCleanup explicit.
Toate invocarile FoxBin2Prg.EXE trec prin Invoke-FoxBin2PrgSafe (timeout + taskkill).
@@ -53,7 +54,10 @@
Reconverteste chiar daca textul e la zi.
.PARAMETER NoOrphanCleanup
Nu sterge textele orfane (doar le raporteaza).
Pastrat pentru compatibilitate: forteaza doar-raportare chiar si cu -OrphanCleanup.
.PARAMETER OrphanCleanup
Sterge efectiv textele orfane. Implicit orfanii sunt DOAR raportati, nu stersi.
.EXAMPLE
powershell -ExecutionPolicy Bypass -File D:\ROA\UTIL\foxbin2prg\git_sync.ps1 -ProjectRoot D:\ROA\ROACONT
@@ -65,14 +69,19 @@ param(
[string[]]$DbfList = @('Locale\locale*.dbf','Help\*.dbf','DATE\Optiuni_*.dbf',
'COMUN\clase\Locale\*.dbf','COMUN\datemenu\*.dbf','COMUN\datemenu\xold\*.dbf',
'COMUN\Drepturi utilizatori\*\*.dbf','COMUN\utile\GridExtras\gridextras.dbf',
'COMUN\utile\ListProperty\lproperty.dbf','COMUN\utile\hpdf\*.dbf','COMUN\utile\hpdf\ReportOutput\*.dbf'),
'COMUN\utile\ListProperty\lproperty.dbf','COMUN\utile\hpdf\*.dbf','COMUN\utile\hpdf\ReportOutput\*.dbf',
# acelasi set si fara prefixul COMUN\, pentru rulari cu -ProjectRoot chiar pe radacina COMUN
'clase\Locale\*.dbf','datemenu\*.dbf','datemenu\xold\*.dbf',
'Drepturi utilizatori\*\*.dbf','utile\GridExtras\gridextras.dbf',
'utile\ListProperty\lproperty.dbf','utile\hpdf\*.dbf','utile\hpdf\ReportOutput\*.dbf'),
# clase FFC/third-party cu #INCLUDE: roundtrip izolat = fals-negativ; editare doar in IDE, fara write-back
[string[]]$RoundtripExempt = @('COMUN\clase\accessibility.vcx','COMUN\clase\oinventar.vcx','COMUN\clase\_gdiplus.vcx','COMUN\clase\_reportlistener.vcx','COMUN\utile\foxcharts\foxcharts.vcx','COMUN\utile\web\_webview.vcx'),
[string]$SubDir = '',
[int]$TimeoutSeconds = 60,
[int]$MaxDb2Mb = 5,
[switch]$Force,
[switch]$NoOrphanCleanup
[switch]$NoOrphanCleanup,
[switch]$OrphanCleanup
)
$ErrorActionPreference = 'Stop'
@@ -283,7 +292,7 @@ if (-not $SubDir) {
}
if ($isOrphan) {
$orphansDeleted += (Get-RelPath $t.FullName)
if (-not $NoOrphanCleanup) { Remove-Item -LiteralPath $t.FullName -Force -ErrorAction SilentlyContinue }
if ($OrphanCleanup -and -not $NoOrphanCleanup) { Remove-Item -LiteralPath $t.FullName -Force -ErrorAction SilentlyContinue }
}
}
}
@@ -295,7 +304,7 @@ Write-Host ''
Write-Host "--- Sumar git_sync ---"
Write-Host "Convertite: $ok Sarite(la zi): $up Esuate: $($failures.Count)"
if ($orphansDeleted.Count -gt 0) {
$verb = if ($NoOrphanCleanup) { 'raportate (nesterse)' } else { 'sterse' }
$verb = if ($OrphanCleanup -and -not $NoOrphanCleanup) { 'sterse' } else { 'raportate (nesterse)' }
Write-Host "Orfani ${verb}: $($orphansDeleted.Count)"
$orphansDeleted | ForEach-Object { Write-Host " orfan: $_" }
}