Watchman.get_mergebase
Summary:
This adds an API to `Watchman` and `Watchman_lwt` which uses a one-off scm-aware watchman query to figure out the mergebase.
I am adding this because I want to know when the mergebase changes. Unfortunately, I can't use an scm-aware subscription, because it would filter out files which change during a rebase. So instead, I plan to call `Watchman_lwt.get_mergebase` whenever an `hg.update` finishes, to detect when the mergebase changes.
It's important to note, this will NOT use the existing connection for this one-off query. The existing connection might be used for a subscription, which means watchman might push a message to us and we may mis-interpret that message as a response.
Reviewed By: jbrown215
Differential Revision:
D13060161
fbshipit-source-id:
db179da6dd49d38da02fc6b66c9d632a27acb445