Page MenuHomeSoftware Heritage

Open '/revision/<sha1>/prev/<sha1list>/log/' route
ClosedPublic

Authored by jbertran on Jun 23 2016, 5:01 PM.

Diff Detail

Repository
rDWAPPS Web applications
Branch
ContextBrowse
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 248
Build 367: Software Heritage Python tests
Build 366: arc lint + arc unit

Event Timeline

jbertran retitled this revision from to Open '/revision/<sha1>/prev/<sha1list>/log/' route.
jbertran updated this object.
jbertran edited the test plan for this revision. (Show Details)
jbertran edited edge metadata.

Api: revision_log test fixes

ardumont added inline comments.
swh/web/ui/backend.py
183

I don't remember, do we absolutely need to check the length?

swh/web/ui/service.py
236

What about lookup_revisions?

255

you could use map or a generator here.

In general, personally, i avoid round-trips if i can avoid it.

258

You could also use map

map(converters.from_revisions, revisions)

or a generator ^^

(converters.from_revision(x) for x in revisions)

The superior layer does the translation before serializing anyway.

Impact: You'll need to force the lazyness in your tests for this function (by wrapping your call in a list for example).

swh/web/ui/views/api.py
705

children path

723

if not prev_sha1s:

725

you can remove the else: altogether.

jbertran added inline comments.
swh/web/ui/service.py
236

I feel it's too easy to misread lookup_revisions as lookup_revision or the other way around.

255

This creates a problem with backend call args checking, which I'm currently solving.

swh/web/ui/service.py
236

That's a good point ^^

jbertran edited edge metadata.

service: minor fixes, switch to map objects instead of lists

This revision is now accepted and ready to land.Jun 24 2016, 2:51 PM
This revision was automatically updated to reflect the committed changes.