Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Debian Blends Team
website
Compare revisions
2d70542ab0aae9783548c15d09c0d0f570f8b20a to bf7d8f83e17cc80f43477b048d8318847e3e5476
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
blends-team/website
Select target project
No results found
bf7d8f83e17cc80f43477b048d8318847e3e5476
Select Git revision
Swap
Target
blends-team/website
Select target project
gber/website
parodper/website
sunilmohan/website
pabs/blends-website
blends-team/website
moeller/website
jcristau/blends-website
7 results
2d70542ab0aae9783548c15d09c0d0f570f8b20a
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Waiting for Salsa 1800 seconds
· 65af41e3
Andreas Tille
authored
6 years ago
65af41e3
Now try all teams
· bf7d8f83
Andreas Tille
authored
6 years ago
bf7d8f83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/machine_readable/fetch-machine-readable_salsa.py
+12
-5
12 additions, 5 deletions
misc/machine_readable/fetch-machine-readable_salsa.py
with
12 additions
and
5 deletions
misc/machine_readable/fetch-machine-readable_salsa.py
View file @
bf7d8f83
...
...
@@ -37,7 +37,7 @@ BLENDSGROUPS={ 'Debian 3D Printing Team' : '3dprinter'
# FIXME: Debian Perl Group is listed with only 2 projects which is definitely wrong
# just start with one team
BLENDSGROUPS
=
{
'
Debian Med
'
:
'
debian-med
'
}
#
BLENDSGROUPS={ 'Debian Med' : 'debian-med'}
debianmetadata
=
[
'
changelog
'
,
'
control
'
,
...
...
@@ -54,7 +54,7 @@ READMEDEBIANARCHIVE='/srv/blends.debian.org/www/_'+TDNAME+'/README.Debian.tar.xz
TARGETDIR
=
os
.
path
.
join
(
os
.
environ
[
'
HOME
'
],
TDNAME
)
SLEEPTIME
=
1
SLEEPUNTILRETRY
=
36
00
SLEEPUNTILRETRY
=
18
00
debug
=
0
# do not clean dirs. FIXME: Find a method to detect removed repositories and clean this up here
...
...
@@ -63,6 +63,10 @@ try:
except
:
pass
def
wait_for_salsa
():
time
.
sleep
(
SLEEPUNTILRETRY
)
print
(
"
Received GitlabGetError: 429 - Retry later ... waiting for %i seconds
"
%
SLEEPUNTILRETRY
)
def
get_blends_groups
():
blends_groups
=
[]
groups
=
gl
.
groups
.
list
(
all
=
True
,
order_by
=
'
name
'
,
sort
=
'
asc
'
)
...
...
@@ -87,8 +91,7 @@ def output_metadata(subdir, metadata):
try
:
file_info
=
project
.
repository_blob
(
item
[
'
id
'
])
except
gitlab
.
exceptions
.
GitlabGetError
:
time
.
sleep
(
SLEEPUNTILRETRY
)
print
(
"
Received GitlabGetError: 429 - Retry later ... waiting for %i seconds
"
%
SLEEPUNTILRETRY
)
wait_for_salsa
()
file_info
=
project
.
repository_blob
(
item
[
'
id
'
])
content
=
base64
.
b64decode
(
file_info
[
'
content
'
])
if
item
[
'
name
'
]
==
'
metadata
'
:
...
...
@@ -117,7 +120,11 @@ for group in blends_groups:
# projects = group.projects.list(page=1, per_page=10, order_by='name', sort='asc')
print
(
"
%s has %i projects (Blend name %s)
"
%
(
group
.
attributes
[
'
name
'
],
len
(
projects
),
blend
))
# group.attributes['id'], group.attributes['path']) # , group.attributes['description'], group.attributes['full_name'])
for
pr
in
projects
:
project
=
gl
.
projects
.
get
(
pr
.
attributes
[
'
id
'
])
# without this extra get repository_tree() fails
try
:
project
=
gl
.
projects
.
get
(
pr
.
attributes
[
'
id
'
])
# without this extra get repository_tree() fails
except
gitlab
.
exceptions
.
GitlabGetError
:
wait_for_salsa
()
project
=
gl
.
projects
.
get
(
pr
.
attributes
[
'
id
'
])
# without this extra get repository_tree() fails
name
=
project
.
attributes
[
'
name
'
]
namedir
=
os
.
path
.
join
(
TARGETDIR
,
name
[
0
])
if
not
os
.
path
.
exists
(
namedir
):
...
...
This diff is collapsed.
Click to expand it.