/**
   require() plugin which returns a handle to the repo Db object for
   Fossil.require's shared Fossil.Context.  If no checkout has been
   opened when this is called, openCheckout() is called on the
   context, otherwise there are no side effects.
*/

/* reminder to self: we address require.fsl directly here,
   instead of via require()'ing it, for efficiency's sake.
*/
affirm requireS2;
affirm const F = requireS2.fsl;
affirm F inherits Fossil.Context;
if(!F.db || !F.db.checkout) F.openCheckout();
return F.db.checkout;
