A long time ago I thought it might make sense to make the RPCs for
patch display two parts. The first part was a static patchScript
that only returns the file content, and thus could be infinitely
cacheable on edge proxies because the content never changes.
The second part was supposed to be a dynamic comment list, showing
the current comments in the file.
This didn't really work out.
The static patchScript code actually had to know what comments
existed at display time, in order to ensure sufficient context
lines were packaged for the client. I also never got around to
teaching gwtjsonrpc how to perform cached GET requests. Even if
we did, access control rules within a project could change the READ
permission from being public readable to being private, which would
mean edge proxies might still had that private data.
As it turns out, we can simplify the entire code base by putting
the two together as a single RPC. We no longer need to perform an
RPC join in order to display the result in PatchScreen, and we can
cut in half the number of database queries required, as we used to
be doing the comment loading work twice per screen display.
Change-Id: Ic1a129ff507da0bbe97ca03ce31c566981ed3855
Signed-off-by: Shawn O. Pearce <sop@google.com>