phabricator: rework phabread to reduce memory usage and round-trips
This patch reworked phabread a bit so it fetches the lightweight
"Differential Revision" metadata for a stack first. Then read other data.
This allows the code to:
a) send 1 request to get all `hg:meta` data instead of N requests
b) patches are read in desired order, no need to buffer the output
"b)" reduces the memory usage from O(N^2) to O(N) since we no longer keep
old patch contents in memory.
The above `N` means the number of patches in the stack.
#if no-windows no-osx
$ mkdir -p xdgconf/hg
$ echo '[ui]' > xdgconf/hg/hgrc
$ echo 'username = foobar' >> xdgconf/hg/hgrc
$ XDG_CONFIG_HOME="`pwd`/xdgconf" ; export XDG_CONFIG_HOME
$ unset HGRCPATH
$ hg config ui.username 2>/dev/null
foobar
#endif