(* * Copyright (c) 2017-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) open! IStd module F = Format module L = Logging type revision = Current | Previous let string_of_revision = function Current -> "current" | Previous -> "previous" let pp_revision f r = F.pp_print_string f (string_of_revision r) let checkout revision = let script_opt = match revision with | Current -> Config.previous_to_current_script | Previous -> Config.current_to_previous_script in match script_opt with | None -> L.(die UserError) "Please specify a script to checkout the %a revision of your project using --checkout-%a \