[darcs-users] Origin of sha1 hash value

Travis Cross travis at crosswirecorp.com
Mon Feb 27 21:45:33 UTC 2006


Thanks for the almost instantaneous reply.  I didn't see it until
after Lele's reply because it ended up in the wrong folder (...no
darcs-users list headers, spam filtering...).

zooko at zooko.com wrote:
> The patch id isn't a hash of the patch, but a hash of the patch
> metadata.  As far as I know, this gains none of the benefits of
> hash-based identification but suffers all of the costs and then
> some.

Interesting, and a bit peculiar ;)  Though I suppose since the 
datetime and the author are hashed as part of the metadata, that 
pretty much guarantees a unique identifier in normal usage.

> If I were you I would customize tailor.  Depending on what you
> want to do, simply --patch-name-format="your string" would do.
> If not that, then writing your own pre-commit hook might do.  Or
> else hacking the tailor source.

Thanks for the hints.  If the 'darcs send' / 'darcs apply' paradigm 
didn't work so beautifully, I certainly would consider this route.

As it is, I've whipped up some CL and elisp functions to parse and 
strip the patch bundle in a 'svndumpfilter' sort of way.  In 
addition to making log comments more darcs-ish, this is allowing me 
to break a monolithic repository into smaller and more logical chunks.

I'm just glad darcs doesn't insist that the patch bundle contain a 
hash value ;) -- That's a major feature to me.

Cheers,

-- Travis




More information about the darcs-users mailing list