Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
scmperf
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
scmperf
Commits
ba4c5deb
Commit
ba4c5deb
authored
5 years ago
by
Raphaël Gomès
Browse files
Options
Downloads
Patches
Plain Diff
py3: move print statements to the print function
parent
307b9c16
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
create_stripped_cached_repos.py
+2
-1
2 additions, 1 deletion
create_stripped_cached_repos.py
scheduler.py
+1
-0
1 addition, 0 deletions
scheduler.py
script/setup-repos
+16
-14
16 additions, 14 deletions
script/setup-repos
with
19 additions
and
15 deletions
create_stripped_cached_repos.py
+
2
−
1
View file @
ba4c5deb
"""
Ensure that all repository are cloned and at their tip
"""
from
__future__
import
print_function
import
errno
import
os
import
subprocess
...
...
@@ -18,7 +19,7 @@
raise
for
repo_name
,
repo
in
config
[
"
repos
"
].
items
():
clonedir
=
join
(
repos_dir
,
repo_name
)
print
partial_revset
print
(
partial_revset
)
for
pset
,
setconfig
in
partial_revset
.
items
():
revset
=
setconfig
.
get
(
'
remove
'
)
repo_suffix
=
urllib
.
quote_plus
(
revset
)
...
...
This diff is collapsed.
Click to expand it.
scheduler.py
+
1
−
0
View file @
ba4c5deb
...
...
@@ -13,6 +13,7 @@
can edit this file, please use an editor that detects when the tasks file
changed since you start editing it (at least nano does it).
"""
from
__future__
import
print_function
import
re
import
os
import
argparse
...
...
This diff is collapsed.
Click to expand it.
script/setup-repos
+
16
−
14
View file @
ba4c5deb
...
...
@@ -2,6 +2,8 @@
#
# Script to setup the reference repository used for benchmarl
from
__future__
import
print_function
DEFAULT_REPO_SOURCE
=
"
https://static.octobus.net/asv/
"
import
hashlib
...
...
@@ -40,10 +42,10 @@
Repository will be fetch from `source` and setup in `repodir`
"""
print
"
Setting up reference repository: %s
"
%
repo
print
(
"
Setting up reference repository: %s
"
%
repo
)
# setup one
# download reference
# extract partial from `.benchrepo`
# setup partial
# download partial
# hg update the reference
...
...
@@ -44,10 +46,10 @@
# setup one
# download reference
# extract partial from `.benchrepo`
# setup partial
# download partial
# hg update the reference
print
'
main reference
'
print
(
'
main reference
'
)
setup_repo_variant
(
repodir
,
source
,
repo
,
None
,
update
=
True
)
refpath
=
join
(
repodir
,
repo
+
'
.benchrepo
'
)
if
not
os
.
path
.
exists
(
refpath
):
...
...
@@ -51,7 +53,7 @@
setup_repo_variant
(
repodir
,
source
,
repo
,
None
,
update
=
True
)
refpath
=
join
(
repodir
,
repo
+
'
.benchrepo
'
)
if
not
os
.
path
.
exists
(
refpath
):
print
'
missing data file
'
print
(
'
missing data file
'
)
setup_repo_variant
(
repodir
,
source
,
repo
,
None
,
update
=
True
,
force
=
True
)
refdata
=
read_yaml
(
refpath
)
partial_sets
=
refdata
.
get
(
"
partial-sets
"
)
...
...
@@ -60,7 +62,7 @@
raise
SetupError
(
msg
)
for
variant
in
sorted
(
partial_sets
):
print
'
partial reference:
'
,
variant
print
(
'
partial reference:
'
,
variant
)
setup_repo_variant
(
repodir
,
source
,
repo
,
variant
)
def
repobasename
(
repo_name
,
partial_id
):
...
...
@@ -152,7 +154,7 @@
repo_path
=
repopath
(
repo_dir
,
repo_name
,
partial_id
)
setup_file
=
setupfile
(
repo_path
)
if
os
.
path
.
exists
(
setup_file
)
and
not
force
:
print
'
already up to date
'
print
(
'
already up to date
'
)
return
if
os
.
path
.
exists
(
repo_path
):
shutil
.
rmtree
(
repo_path
)
...
...
@@ -156,6 +158,6 @@
return
if
os
.
path
.
exists
(
repo_path
):
shutil
.
rmtree
(
repo_path
)
print
'
downloading repo
'
print
(
'
downloading repo
'
)
download_repo
(
repo_dir
,
source
,
repo_name
,
partial_id
)
if
update
:
...
...
@@ -160,6 +162,6 @@
download_repo
(
repo_dir
,
source
,
repo_name
,
partial_id
)
if
update
:
print
'
updating repo
'
print
(
'
updating repo
'
)
update_repo
(
repo_path
)
conclude_setup
(
repo_path
)
...
...
@@ -177,12 +179,12 @@
if
__name__
==
"
__main__
"
:
if
not
(
2
<=
len
(
sys
.
argv
)
<=
4
):
print
>>
sys
.
stderr
,
"
usage: %s REPOS-FILE [DIRECTORY [SOURCE]]
"
print
>>
sys
.
stderr
,
""
print
>>
sys
.
stderr
,
"
Make sure all item in REPOS-FILE are setup in DIRECTORY.
"
print
>>
sys
.
stderr
,
"
(default `.`).
"
print
>>
sys
.
stderr
,
"
When missing, data are fetched from SOURCE
"
print
>>
sys
.
stderr
,
"
(default: %s)
"
%
DEFAULT_REPO_SOURCE
print
(
"
usage: %s REPOS-FILE [DIRECTORY [SOURCE]]
"
,
file
=
sys
.
stderr
)
print
(
""
,
file
=
sys
.
stderr
)
print
(
"
Make sure all item in REPOS-FILE are setup in DIRECTORY.
"
,
file
=
sys
.
stderr
)
print
(
"
(default `.`).
"
,
file
=
sys
.
stderr
)
print
(
"
When missing, data are fetched from SOURCE
"
,
file
=
sys
.
stderr
)
print
(
"
(default: %s)
"
%
DEFAULT_REPO_SOURCE
,
file
=
sys
.
stderr
)
sys
.
exit
(
128
)
reposfile
=
sys
.
argv
[
1
]
...
...
@@ -203,6 +205,6 @@
try
:
setup_all_repos
(
repo_dir
,
source
,
repos
)
except
SetupError
as
exc
:
print
>>
sys
.
stderr
,
'
abort:
'
,
str
(
exc
)
print
(
'
abort:
'
,
str
(
exc
)
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
sys
.
exit
(
0
)
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