[darcs-users] patch index question

Michael Hendricks michael at ndrix.org
Wed Mar 21 14:57:07 UTC 2012

I understand the goal of the patch index (see issue 1566 for
background), and would love to have faster annotate and changes
commands.  However, I'm confused by the complexity of the current
design.  Why can't the problem be solved by including patch summaries
in the inventory files?  By patch summaries, I mean that each patch in
hashed_inventory would look something like this:

[update the frobnitz
John Doe <john.doe at example.com>**20120319211029
 Ignore-this: c69c695e19698f612e5c72931c88b47f
hash: 0000000463-474892955156df814cb1659ce0b692155990e04680e30b0044cf8e604eb8e63
hunk ./src/Darcs/Annotate.hs 49 -1 +1
hunk ./src/Darcs/Annotate.hs 175 -1 +1
hunk ./tests/foo.sh 75 -4 +9
replace ./src/Darcs/Arguments.hs [A-Za-z_0-9] substract subtract

I can traverse the entire inventory on screened in about .2s so we
could quickly select all patches affecting a given file.

It also seems that having patch summaries in the inventory files would
offer many of the benefits of v3 prims (patch commute without loading
most patch content) without being so far reaching.  The patch
summaries would also make a partial annotate command faster (annotate
./foo lines 10-24) since patches affecting irrelevant lines could be
skipped quickly.

Can the darcs gurus help me understand why this approach hasn't been
pursued (or was pursued and abandoned)?



More information about the darcs-users mailing list