Summary:
We'd like to keep track of hg cache size on users' machines. It's generally
useful, but it will be even more important with megarepo rollout. The job will be triggered by cron.
This is a very simple implementation, most of it was copy-pasted from
https://fburl.com/diffusion/g8ysyxo1.
Note that I intentionally didn't call hg to get hgcache size.
Since this binary will be triggered by cron, it will run as
root without a direct access to user's repository.
A few notes for the future:
1) Currentlly I'm planning to get hgcache path value from opsfiles.
I'm not sure if we'd need to change this later when dynamic configs are fully
rolled out. CC DurhamG
2) We might want to track size of pack files (are they still used at all?) and
indexed log files separately
Reviewed By: ikostia
Differential Revision: D23341149
fbshipit-source-id: 2a600d7a8034ac887014788f1024fb9866c3ef76