[darcs-devel] [issue1039] wish: detect seemingly unrelated repositories

David Roundy bugs at darcs.net
Wed Sep 17 15:21:06 UTC 2008


David Roundy <droundy at darcs.net> added the comment:

Jason: Okay, I'm breaking down and implementing a fix for issue27, which means
that we can just check for overlap of patch IDs.

Dmitry: there aren't really any docs, but it's pretty simple.  Each patch has a
"name" which is a PatchInfo, and these names are stored in the inventory, along
with pointers to the patch contents.  You can get the list of all patch names in
a repository with:

ps <- read_repo repository
let pinfos = mapRL (mapRL info) ps

so now pinfos will be a [[PatchInfo]] including all patches in the repository
starting with the most recent.  It's a list of lists because the inventory is
broken into multiple files to save bandwidth (since we often only need look at
the most recent patches) so you'd want to look for overlap between the first
elements first, and so on.

P.S. A Repository is just a data structure that holds whatever is needed to read
from a repository.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1039>
__________________________________


More information about the darcs-devel mailing list