[darcs-users] Re: Patch hash calculation
cakoose at yahoo.com
Thu Nov 4 19:11:37 UTC 2004
Kannan Goundan wrote:
> I tried renaming a patch by going into the _darcs directory and
> editing the "inventory" file and the patch file. Now, "darcs
> repair" tells me that it couldn't read my patches. I'm guessing
> that this is because the checksum doesn't match.
> Looking at the sources it looks like SHA1 is being used. I tried
> giving the "sha1sum" utility various subsets of the patch text but
> couldn't match it up with Darcs's checksum. Does anybody know how
> to calculate the checksum for a patch text?
Thanks for the replies. For some reason "make ghci" failed, but your
post told me what to look for. So, using my severely broken
knowledge of Haskell, I inserted as many calls to "putStr $
make_filename pi" as GHC would let me insert and finally got Darcs to
print the filename out.
I understand that renaming patches is sort of wrong, but the
following two features would have really helped:
1. Instead of just saying "Couldn't load patch" Darcs could tell you
why it couldn't load the patch. If it is because the file doesn't
exist, then a printout of the expected filename would be nice.
2. I renamed the patch in "inventory" and renamed the patch file but
forgot to change the patch name in the patch file itself. It would
be nice if "darcs check" detected this problem.
BTW, I'm using the "digest" mode for darcs-users and I can't figure
out how to get the threading to work properly. Is there a way to get
it to work (I'm using Yahoo Mail and don't have direct access to the
headers)? Should I just switch to normal mode?
Do you Yahoo!?
Check out the new Yahoo! Front Page.
More information about the darcs-users