Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-model
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-model
Commits
c3d94398
Commit
c3d94398
authored
8 years ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
'metadata' entry is expected to be json serializable
so no bytes, and we enforce during the checksum computation function
parent
aca1e40f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swh/model/identifiers.py
+4
-1
4 additions, 1 deletion
swh/model/identifiers.py
swh/model/tests/test_identifiers.py
+1
-1
1 addition, 1 deletion
swh/model/tests/test_identifiers.py
with
5 additions
and
2 deletions
swh/model/identifiers.py
+
4
−
1
View file @
c3d94398
...
...
@@ -266,7 +266,10 @@ def revision_identifier(revision):
metadata
=
revision
.
get
(
'
metadata
'
,
{})
if
'
gpgsig
'
in
metadata
:
components
.
extend
([
b
'
gpgsig
'
,
b
'
'
,
metadata
[
'
gpgsig
'
],
b
'
\n
'
])
gpgsig
=
metadata
[
'
gpgsig
'
]
if
isinstance
(
gpgsig
,
str
):
gpgsig
=
gpgsig
.
encode
(
'
utf-8
'
)
components
.
extend
([
b
'
gpgsig
'
,
b
'
'
,
gpgsig
,
b
'
\n
'
])
if
'
extra_headers
'
in
metadata
:
headers
=
metadata
[
'
extra_headers
'
]
...
...
This diff is collapsed.
Click to expand it.
swh/model/tests/test_identifiers.py
+
1
−
1
View file @
c3d94398
...
...
@@ -318,7 +318,7 @@ class RevisionIdentifier(unittest.TestCase):
'
offset
'
:
480
,
},
'
metadata
'
:
{
'
gpgsig
'
:
b
'''
-----BEGIN PGP SIGNATURE-----
'
gpgsig
'
:
'''
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Darwin)
\n
\n
iQIcBAABAgAGBQJVJcYsAAoJEBiY3kIkQRNJVAUQAJ8/XQIfMqqC5oYeEFfHOPYZ
L7qy46bXHVBa9Qd8zAJ2Dou3IbI2ZoF6/Et89K/UggOycMlt5FKV/9toWyuZv4Po
L682wonoxX99qvVTHo6+wtnmYO7+G0f82h+qHMErxjP+I6gzRNBvRr+SfY7VlGdK
...
...
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