> Fri Mar 30 08:43:25 PDT 2007  David Roundy <[EMAIL PROTECTED]>
>   * fix checkpoint handling with hashed inventories.

Accepting, with some possible things to double-check

Generalities
------------
There's two things going on in this code,

1) The checkpoint-related functions are migrated to their own module,
   presumably so that they can be shared by other kinds of darcs
   repository, not just the vanilla plain inventory darcs ones.

2) The code is generalised to works with --with-repo or other such
   flags.

I gather that the fix in question is #2.  The former really just makes
things tidier and twiddles a few imports in the commands.  All the code
in Checkpoint is basically moved over from DarcsRepo, with s/liftM/fmap/
(*) and the repo generalisation.  There is a get_checkpoint_sloppily
function, but that's a DarcsRepo-specific version of Checkpoint.
get_check_internal, which we probably don't want to export.

Things to check
---------------
> +get_check_internal :: [DarcsFlag] -> String -> IO (Maybe Patch)
> +get_check_internal opts r = do
> +  pis <- (map fst . concat) `fmap` (identifyRepository opts "." >>= 
> read_repo)

Why "." here and not r?

> +write_checkpoint :: Repository -> PatchInfo -> IO ()
> +write_checkpoint repo pinfo = do
[snip]
> +    with_tag repo pinfo $ do
> +      s <- mmap_slurp "."

Is it safe to assume "." here as well?

(*) In case I haven't asked, why fmap?  Less to type? Increased
    generality, i.e.  not requiring a monad specifically?
    Some deeper reason?  Just curious.

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.

Attachment: pgpJbtj66uKGV.pgp
Description: PGP signature

_______________________________________________
darcs-devel mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to