HomePhabricator

phabstatus: query conduit more efficiently for "hg log"

Authored by simpkins.

Description

phabstatus: query conduit more efficiently for "hg log"

Summary:
Update the phabstatus code to peek ahead at revisions to be logged by
hg log and hg log --graph and query phabricator for multiple revisions at
once, rather than having to query them one at a time.

Previously it had special integration with the smartlog where it could do this
for smartlog, but not for the normal "hg log" command.

Wrapping the revset iterator this way feels somewhat hacky, but this seems like
the best way to achieve the desired results without upstream changes. (In an
ideal world we would perhaps update the log code to process things in an
asynchronous fashion, to better support templates that may take a non-trivial
amount time to render. Ideally the revset query would be processed in parallel
with template rendering.)

Test Plan:
Confirmed existing tests still pass, and manually tested various combinations
of hg log, hg log --graph and hg smartlog

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Subscribers: ryanmce

Differential Revision: https://phab.mercurial-scm.org/D80

Details

Committed
simpkinsJul 19 2017, 3:34 PM
Reviewer
Restricted Project
Differential Revision
D80: phabstatus: query conduit more efficiently for "hg log"
Parents
rFBHGXb2de23e301d2: phabstatus: clean up showsyncstatus()
Branches
Unknown
Tags
Unknown