Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Sort blends to enable easy diffs for the logs
· b9085d27
Andreas Tille
authored
Sep 07, 2018
b9085d27
Less noise
· ad56c376
Andreas Tille
authored
Sep 07, 2018
ad56c376
Hide whitespace changes
Inline
Side-by-side
misc/machine_readable/fetch-machine-readable_salsa.py
View file @
ad56c376
...
...
@@ -138,7 +138,7 @@ gl = gitlab.Gitlab("https://salsa.debian.org") # , private_token=SALSA_TOKEN) #
LAST_ACTIVITY
=
'
last_activity_at:
'
LAST_ACTIVITY_LENGTH
=
len
(
LAST_ACTIVITY
)
for
blend
,
gpath
in
BLENDSGROUPS
.
items
():
for
blend
,
gpath
in
sorted
(
BLENDSGROUPS
.
items
()
)
:
unchanged
,
changed
,
new
,
ignored
=
(
0
,
0
,
0
,
0
)
group
=
gl
.
groups
.
get
(
gpath
,
with_projects
=
False
,
simple
=
True
)
valid_group_names
=
[
group
.
name
]
...
...
@@ -158,9 +158,6 @@ for blend, gpath in BLENDSGROUPS.items():
if
sprojects
:
print
(
"
%i projects found in subgroups
"
%
len
(
sprojects
))
valid_group_names
.
extend
(
valid_subgroup_names
)
if
debug
>
0
:
for
sp
in
sprojects
:
print
(
"
id = %i, name = %s, last_activity_at = %s, path = %s, web_url = %s
"
%
(
sp
.
id
,
sp
.
name
,
sp
.
last_activity_at
,
sp
.
path
,
sp
.
web_url
))
projects
.
extend
(
sprojects
)
for
project
in
projects
:
name
=
project
.
name
...
...
@@ -212,8 +209,6 @@ for blend, gpath in BLENDSGROUPS.items():
# see thread around https://lists.debian.org/debian-devel/2018/07/msg00125.html
time
.
sleep
(
SLEEPTIMEFILES
)
# for lazy=True read: https://python-gitlab.readthedocs.io/en/stable/api-usage.html#lazy-objects
if
debug
>
0
:
print
(
"
DEBUG: Get data from project with ID = %s
"
%
str
(
project
.
id
))
pr
=
gl
.
projects
.
get
(
project
.
id
,
lazy
=
True
)
if
output_metadata
(
pr
,
'
debian
'
,
debianmetadata
):
output_metadata
(
pr
,
'
debian/upstream
'
,
upstreammetadata
)
...
...