Page MenuHomePhabricator

phabstatus: query conduit more efficiently for "hg log"

Authored by simpkins on Jul 13 2017, 10:32 PM.


Group Reviewers
Restricted Project
rFBHGX9c846cbfe7d5: phabstatus: query conduit more efficiently for "hg log"

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

Diff Detail

rFBHGX Facebook Mercurial Extensions
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

simpkins created this revision.Jul 13 2017, 10:32 PM
ryanmce accepted this revision.Jul 19 2017, 9:56 AM
ryanmce added a subscriber: ryanmce.

Nice addition

This revision is now accepted and ready to land.Jul 19 2017, 9:56 AM
This revision was automatically updated to reflect the committed changes.