Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Specification Tools
Scripts
Commits
8b67e2e4
Commit
8b67e2e4
authored
1 year ago
by
Miguel Angel Reina Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Fixing limits to determine the clause being changed
parent
9660359b
No related branches found
No related tags found
No related merge requests found
Pipeline
#185
passed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
generateChangemarks/changemarks.py
+7
-3
7 additions, 3 deletions
generateChangemarks/changemarks.py
with
7 additions
and
3 deletions
generateChangemarks/changemarks.py
+
7
−
3
View file @
8b67e2e4
...
...
@@ -153,16 +153,20 @@ https://forge.etsi.org/rep/cdm/pipeline-scripts/-/blob/main/common/Dockerfile.st
for
patched_file
in
mr
.
patch_set
:
if
patched_file
.
source_file
.
startswith
(
"
a/TS
"
):
logging
.
debug
(
f
"
Looking at changes in
{
patched_file
.
source_file
}
"
)
lines_added
=
0
lines_removed
=
0
for
change
in
patched_file
:
change_start_line
,
change_end_line
,
lines_added
,
lines_removed
=
changeDetails
(
change
)
change_start_line
,
change_end_line
,
change_lines_added
,
change_lines_removed
=
changeDetails
(
change
)
lines_added
=
lines_added
+
change_lines_added
lines_removed
=
lines_removed
+
change_lines_removed
# Check the previous changed_clause
if
(
changed_clause
.
from_id
<=
change_start_line
)
and
(
changed_clause
.
to_id
+
lines_added
-
lines_removed
>=
change_end_line
):
if
(
changed_clause
.
from_id
<=
change_start_line
-
lines_added
+
lines_removed
)
and
(
changed_clause
.
to_id
+
lines_added
-
lines_removed
>=
change_end_line
):
generateMDforChange
(
progress
,
mdLines
,
changed_clause
,
change
,
outDirectory
,
True
)
break
i
=
0
# Check all clauses
for
clause
in
clauses
:
if
(
clause
.
from_id
<=
change_start_line
)
and
(
clause
.
to_id
+
lines_added
-
lines_removed
>=
change_end_line
):
if
(
clause
.
from_id
<=
change_start_line
-
lines_added
+
lines_removed
)
and
(
clause
.
to_id
+
lines_added
-
lines_removed
>=
change_end_line
):
changed_clause
=
clauses
.
pop
(
i
)
changed_clauses
.
append
(
clause
)
generateMDforChange
(
progress
,
mdLines
,
changed_clause
,
change
,
outDirectory
,
False
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment