Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-storage
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
Model registry
Operate
Environments
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
Platform
Development
swh-storage
Commits
4042c3b2
Commit
4042c3b2
authored
9 years ago
by
Nicolas Dandrimont
Browse files
Options
Downloads
Patches
Plain Diff
swh.storage.storage: implement revision_missing
parent
ec33fca5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swh/storage/storage.py
+13
-2
13 additions, 2 deletions
swh/storage/storage.py
with
13 additions
and
2 deletions
swh/storage/storage.py
+
13
−
2
View file @
4042c3b2
...
...
@@ -226,13 +226,24 @@ class Storage():
"""
pass
def
revision_missing
(
self
,
revisions
):
@db_transaction_generator
def
revision_missing
(
self
,
revisions
,
cur
):
"""
List revisions missing from storage
Args: an iterable of revision ids
Returns: a list of missing revision ids
"""
pass
db
=
self
.
db
# Create temporary table for metadata injection
db
.
mktemp
(
'
revision
'
,
cur
)
revisions_dicts
=
({
'
id
'
:
dir
,
'
type
'
:
'
git
'
}
for
dir
in
revisions
)
db
.
copy_to
(
revisions_dicts
,
'
tmp_revision
'
,
[
'
id
'
,
'
type
'
],
cur
)
for
obj
in
db
.
revision_missing_from_temp
(
cur
):
yield
obj
[
0
]
def
release_add
(
self
,
releases
):
"""
Add releases to the storage
...
...
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