Re: vc-darcs.el and the length of hashes (cons: Args out of range)

Ivan Zakharyaschev <[email protected]>
Newsgroups gmane.comp.version-control.darcs.user
Message-ID <[email protected]>
On Tue, 15 Dec 2015, Ivan Zakharyaschev wrote:

> I'm not sure about where this inconsistency comes from. Perhaps, an older 
> version of darcs had a different interface w.r.t. the ids of patches. 
> Understanding this would make it clearer how to proceed with a possible fix 
> (keep both variants or not, check versions,...). Do you have any suggestions?

A stupid fix which works for the newer darcs has been pushed to 
http://hub.darcs.net/imz/vc-darcs_jch/patch/2744a57b44e61a4ab186fe38d8d4645b467ce4e2 
.

> SHA1 is 40 hexadecimal digits long -- https://en.wikipedia.org/wiki/SHA-1 .
>
> And vc-darcs.el tries to get 62 symbols of `h' in `vc-darcs-changes'...
>
> So, is `h' the hash?..
>
>               (let ((h (cdr (assoc 'hash (cadr e)))))
>                 (when h
>                   (push (substring h 0 61) l))))))
>
> Probably, yes. So, something is wrong (40 vs 62)...

-- 
Ivan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.