[darcs-users] Signing patches

Daniel Carrera daniel.carrera at theingots.org
Fri Apr 10 20:03:37 UTC 2009


Florent Becker wrote:
> I think your scheme works, except that it makes both recording and
> applying quadratic in the context. Extracting the minimal context takes
> quadratic time (imagine a patch depending on every other previous patch).
>  Since applying (actually, hash-checking) is going to be quadractic anyway
> (because we have to reorder the dependences), it might be smarter to compute
> the minimal context at apply time. [Disclaimer: this is all worst-case
> complexity, one would have to look at realistic mean-case complexity…]

A similar idea was brought up before. Tuomo Valkonen proposed *storing* 
the minimal context but David R felt that this would be too 
disk-inefficient:

http://lists.osuosl.org/pipermail/darcs-devel/2005-March/001399.html

But a variation on the proposal is to simply store a list of patches 
needed to build the minimal context. So that Darcs can build the context 
more easily. That's what I was going for with my 'depend:' lines.

A small change on my previous idea: Instead of storing the hash inside 
the file, make it the file name. So Darcs can locate the right file 
directly:

========== file name: <hash-of-H> ============
[sig: <sign-hash-of-H>]
[Added feature H.
depends: <hash-of-F>
depends: <hash-of-B>
user at example.com**20090331192735]


Daniel.


More information about the darcs-users mailing list