<commit_before>

(** State_enter and State_leave events contains a JSON blob specifying
 * the revision we are moving to. This gets it. *)
let rev_in_state_change json =
  let open Hh_json.Access in
  (return json) >>=
    get_string "rev" |> function
    | Error _ ->
      let () = Hh_logger.log
        "Watchman_utils failed to get rev in json: %s"
        (Hh_json.json_to_string json) in
      None
    | Ok (v, _) -> Some v<commit_msg>[hack] Ignore hg.update state-leave events with merge = True for purposes of mergebase changes tracking<commit_after>

(** State_enter and State_leave events contains a JSON blob specifying
 * the revision we are moving to. This gets it. *)
let rev_in_state_change json =
  let open Hh_json.Access in
  (return json) >>=
    get_string "rev" |> function
    | Error _ ->
      let () = Hh_logger.log
        "Watchman_utils failed to get rev in json: %s"
        (Hh_json.json_to_string json) in
      None
    | Ok (v, _) -> Some v

let merge_in_state_change json =
  let open Hh_json.Access in
  (return json) >>=
    get_bool "merge" |> function
    | Error _ ->
      let () = Hh_logger.log
        "Watchman_utils failed to get merge in json: %s"
        (Hh_json.json_to_string json) in
      None
    | Ok (v, _) -> Some v
{'fraction_non_alphanumeric': 0.0944138473642801, 'fraction_numerical': 0.0, 'mean_word_length': 2.730205278592375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6516441', 'n_tokens_mistral': 424, 'n_tokens_neox': 418, 'n_words': 143}