Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
S
stats-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneurs
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
stats-facil
Validations
b36d6d5c
Valider
b36d6d5c
rédigé
9 years ago
par
diosmosis
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Do not invalidate unnecessary periods.
parent
f34f4ce4
Branches
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
core/Period.php
+8
-7
8 ajouts, 7 suppressions
core/Period.php
tests/PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php
+1
-6
1 ajout, 6 suppressions
...PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php
tests/PHPUnit/Unit/PeriodTest.php
+0
-5
0 ajout, 5 suppressions
tests/PHPUnit/Unit/PeriodTest.php
avec
9 ajouts
et
18 suppressions
core/Period.php
+
8
−
7
Voir le fichier @
b36d6d5c
...
@@ -380,16 +380,17 @@ abstract class Period
...
@@ -380,16 +380,17 @@ abstract class Period
* will cascade to week and day periods and year periods will cascade to month, week and day
* will cascade to week and day periods and year periods will cascade to month, week and day
* periods.
* periods.
*
*
* The method will return periods that are outside the range of this period
* The method will not return periods that are outside the range of this period.
* and a child period for the start/end date encompasses dates outside the range. For example,
* cascading on a month will return the week period for the 1st of the month. The week period
* might include days before the 1st. When cascading further, those days will be included in
* the result.
*
*
* @return Period[]
* @return Period[]
* @ignore
* @ignore
*/
*/
public
function
getAllOverlappingChildPeriods
()
public
function
getAllOverlappingChildPeriods
()
{
return
$this
->
getAllOverlappingChildPeriodsInRange
(
$this
->
getDateStart
(),
$this
->
getDateEnd
());
}
private
function
getAllOverlappingChildPeriodsInRange
(
Date
$dateStart
,
Date
$dateEnd
)
{
{
$result
=
array
();
$result
=
array
();
...
@@ -398,8 +399,8 @@ abstract class Period
...
@@ -398,8 +399,8 @@ abstract class Period
return
$result
;
return
$result
;
}
}
$childPeriods
=
Factory
::
build
(
$childPeriodType
,
$
this
->
getRange
String
());
$childPeriods
=
Factory
::
build
(
$childPeriodType
,
$
dateStart
->
toString
()
.
','
.
$dateEnd
->
to
String
());
return
array_merge
(
$childPeriods
->
getSubperiods
(),
$childPeriods
->
getAllOverlappingChildPeriods
(
));
return
array_merge
(
$childPeriods
->
getSubperiods
(),
$childPeriods
->
getAllOverlappingChildPeriods
InRange
(
$dateStart
,
$dateEnd
));
}
}
/**
/**
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
tests/PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php
+
1
−
6
Voir le fichier @
b36d6d5c
...
@@ -346,9 +346,6 @@ class ArchiveInvalidatorTest extends IntegrationTestCase
...
@@ -346,9 +346,6 @@ class ArchiveInvalidatorTest extends IntegrationTestCase
true
,
true
,
array
(
array
(
'2014_12'
=>
array
(
'2014_12'
=>
array
(
'1.2014-12-29.2014-12-29.1.done'
,
'1.2014-12-30.2014-12-30.1.done'
,
'1.2014-12-31.2014-12-31.1.done'
,
'1.2014-12-29.2015-01-04.2.done'
,
'1.2014-12-29.2015-01-04.2.done'
,
),
),
'2015_01'
=>
array
(
'2015_01'
=>
array
(
...
@@ -389,9 +386,7 @@ class ArchiveInvalidatorTest extends IntegrationTestCase
...
@@ -389,9 +386,7 @@ class ArchiveInvalidatorTest extends IntegrationTestCase
'1.2015-01-26.2015-02-01.2.done'
,
'1.2015-01-26.2015-02-01.2.done'
,
'1.2015-01-01.2015-01-31.3.done'
,
'1.2015-01-01.2015-01-31.3.done'
,
),
),
'2015_02'
=>
array
(
'2015_02'
=>
array
(),
'1.2015-02-01.2015-02-01.1.done'
,
),
'2015_03'
=>
array
(),
'2015_03'
=>
array
(),
'2015_04'
=>
array
(),
'2015_04'
=>
array
(),
'2015_05'
=>
array
(),
'2015_05'
=>
array
(),
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
tests/PHPUnit/Unit/PeriodTest.php
+
0
−
5
Voir le fichier @
b36d6d5c
...
@@ -203,7 +203,6 @@ class PeriodTest extends \PHPUnit_Framework_TestCase
...
@@ -203,7 +203,6 @@ class PeriodTest extends \PHPUnit_Framework_TestCase
array
(
'week'
,
'2015-09-14,2015-09-20'
),
array
(
'week'
,
'2015-09-14,2015-09-20'
),
array
(
'week'
,
'2015-09-21,2015-09-27'
),
array
(
'week'
,
'2015-09-21,2015-09-27'
),
array
(
'week'
,
'2015-09-28,2015-10-04'
),
array
(
'week'
,
'2015-09-28,2015-10-04'
),
array
(
'day'
,
'2015-08-31,2015-08-31'
),
array
(
'day'
,
'2015-09-01,2015-09-01'
),
array
(
'day'
,
'2015-09-01,2015-09-01'
),
array
(
'day'
,
'2015-09-02,2015-09-02'
),
array
(
'day'
,
'2015-09-02,2015-09-02'
),
array
(
'day'
,
'2015-09-03,2015-09-03'
),
array
(
'day'
,
'2015-09-03,2015-09-03'
),
...
@@ -234,10 +233,6 @@ class PeriodTest extends \PHPUnit_Framework_TestCase
...
@@ -234,10 +233,6 @@ class PeriodTest extends \PHPUnit_Framework_TestCase
array
(
'day'
,
'2015-09-28,2015-09-28'
),
array
(
'day'
,
'2015-09-28,2015-09-28'
),
array
(
'day'
,
'2015-09-29,2015-09-29'
),
array
(
'day'
,
'2015-09-29,2015-09-29'
),
array
(
'day'
,
'2015-09-30,2015-09-30'
),
array
(
'day'
,
'2015-09-30,2015-09-30'
),
array
(
'day'
,
'2015-10-01,2015-10-01'
),
array
(
'day'
,
'2015-10-02,2015-10-02'
),
array
(
'day'
,
'2015-10-03,2015-10-03'
),
array
(
'day'
,
'2015-10-04,2015-10-04'
),
),
),
),
),
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter