Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Debian New Member Process
contributors.debian.org
Commits
fe1283f3
Unverified
Commit
fe1283f3
authored
Sep 15, 2020
by
Enrico Zini
Browse files
Deal with model updates
parent
b96f6a21
Pipeline
#176769
passed with stage
in 1 minute and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
summarize-json-dumps
View file @
fe1283f3
...
...
@@ -64,7 +64,7 @@ class Summary:
misses_files
=
True
if
misses_files
:
continue
mo
=
re_dir_date
.
match
(
dirpath
)
if
not
mo
:
log
.
error
(
"%s: skipping path with unrecogniseable date"
,
dirpath
)
...
...
@@ -101,10 +101,17 @@ class Summary:
for
ident
in
identifiers
:
if
ident
[
"hidden"
]:
hidden_identifiers
.
add
((
ident
[
"type"
],
ident
[
"name"
]))
# Load user information
for
u
in
users
:
by_email
[
u
[
"email"
]]
=
u
# Compatibility with old model
if
"username"
not
in
u
:
u
[
"username"
]
=
u
[
"email"
]
name
=
u
.
get
(
"username"
)
if
name
is
None
:
log
.
error
(
"%s: no username or email found for %r"
,
fn
,
u
)
raise
NotImplementedError
(
"input not supported"
)
by_email
[
name
]
=
u
u
[
"idents"
]
=
[]
# Load association information
...
...
@@ -119,13 +126,15 @@ class Summary:
updated
=
0
unchanged
=
0
for
email
,
user
in
by_email
.
items
():
history
=
self
.
users
.
get
(
email
)
for
username
,
user
in
by_email
.
items
():
history
=
self
.
users
.
get
(
username
)
if
history
is
None
:
new
+=
1
self
.
users
[
email
]
=
[(
dt
,
user
)]
self
.
users
[
username
]
=
[(
dt
,
user
)]
elif
history
[
-
1
][
0
]
>
dt
:
log
.
warn
(
"%s: last seen for %s is from %s but found earlier %s: skipped"
,
fn
,
email
,
history
[
-
1
][
0
],
dt
)
log
.
warn
(
"%s: last seen for %s is from %s but found earlier %s: skipped"
,
fn
,
username
,
history
[
-
1
][
0
],
dt
)
elif
history
[
-
1
][
1
]
!=
user
:
updated
+=
1
history
.
append
((
dt
,
user
))
...
...
@@ -133,8 +142,8 @@ class Summary:
unchanged
+=
1
removed
=
0
for
email
in
self
.
users
.
keys
()
-
by_email
.
keys
():
history
=
self
.
users
.
get
(
email
)
for
username
in
self
.
users
.
keys
()
-
by_email
.
keys
():
history
=
self
.
users
.
get
(
username
)
if
history
[
-
1
][
1
]
is
not
None
:
history
.
append
((
dt
,
None
))
removed
+=
1
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment