Re: [darcs-users] vc-darcs.el and the length of hashes (cons: Args out of range)
Ivan Zakharyaschevwrites: > On Tue, 15 Dec 2015, Ivan Zakharyaschev wrote: > >> implementation mentioned at http://darcs.net/RelatedSoftware/Emacs and >> http: //www.emacswiki.org/emacs/DaRcs -- >> http: //www.loveshack.ukfsn.org/emacs/vc-darcs.el -- is not available >> because the site doesn't open.) > > Thanks, Steve, for pointing out that that must be Dave Love's site. Oops. I'd meant to announce the updated version here, but it doesn't look as if I did. > I've just found two vc-darcs repos at hub.darcs.net with changes > authored by him: > > http://hub.darcs.net/fx/vc-darcs/changes > http://hub.darcs.net/ddssff/vc-darcs/changes > > The first one seems to have incorporated the changes from the second > fork, and having fresh changes by Dave Love from as late as October > 04, 2015. The second is nothing to do with me and looks like a proper subset fork. > (Now, I don't have time to try it out.) It should just work with recent Emacsen (to the extent that Emacs VC will support darcs-like systems, even now, sigh). It may work as far back as Emacs 21 (but I don't have darcs on RHEL5), and probably with fairly old darcsen as well as the current release. It's painful to keep up with all the Emacs incompatibilities and changes in darcs which break things like this, though. I use it (and darcsum.el) for development work, and if it has problems that aren't due to Emacs I can probably fix them swiftly (but mail me, since there aren't alerts for issues on the hub). It's unfortunate I couldn't get it into Emacs, which was what it was written for, or darcs contrib. > So, the wikis should probably be updated accordingly -- to point to > the live darcs repo with the code. (Perhaps, I'll do that a bit > later.) I'd forgotten about the mention on the darcs wiki. I'll see if I can still edit that. ___ darcs-users mailing list darcs-users@darcs.net http://lists.osuosl.org/mailman/listinfo/darcs-users
Re: [darcs-users] vc-darcs.el and the length of hashes (cons: Args out of range)
On Tue, 15 Dec 2015, Ivan Zakharyaschev wrote: implementation mentioned at http://darcs.net/RelatedSoftware/Emacs and http: //www.emacswiki.org/emacs/DaRcs -- http: //www.loveshack.ukfsn.org/emacs/vc-darcs.el -- is not available because the site doesn't open.) Thanks, Steve, for pointing out that that must be Dave Love's site. I've just found two vc-darcs repos at hub.darcs.net with changes authored by him: http://hub.darcs.net/fx/vc-darcs/changes http://hub.darcs.net/ddssff/vc-darcs/changes The first one seems to have incorporated the changes from the second fork, and having fresh changes by Dave Love from as late as October 04, 2015. (Now, I don't have time to try it out.) So, the wikis should probably be updated accordingly -- to point to the live darcs repo with the code. (Perhaps, I'll do that a bit later.) Best regards, Ivan. ___ darcs-users mailing list darcs-users@darcs.net http://lists.osuosl.org/mailman/listinfo/darcs-users
[darcs-users] vc-darcs.el and the length of hashes (cons: Args out of range)
Hello! As a darcs user from time to time (and sympathizer), I have recently started to use vc-darcs.el in Emacs. (I know there are other darcs libraries for Emacs, but I'm interested in the Emacs VC interface, too, because I'm accustomed to using it in certain situations.) I want to share some observations about a discovered bug in one of the implementations of vc-darcs (which I'm left with as the only one, because the other link is dead). Perhaps, this will help make it better. 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? Best regards, Ivan -- Forwarded message -- Date: Tue, 8 Dec 2015 13:18:54 +0300 From: Ivan ZakharyaschevTo: jch@ Subject: vc-darcs: cons: Args out of range Hello! I've just installed your vc-darcs.el from your repo. (BTW, the second implementation mentioned at http://darcs.net/RelatedSoftware/Emacs and http://www.emacswiki.org/emacs/DaRcs -- http://www.loveshack.ukfsn.org/emacs/vc-darcs.el -- is not available because the site doesn't open.) When I call C-x v l in a file under darcs control, I get the error message: cons: Args out of range: "6119dca7cd08261f99cecc2643451601ad6d", 0, 61 I'm using: $ darcs --version 2.10.0 (release) Best regarads, -- Ivan -- Forwarded message -- Date: Tue, 8 Dec 2015 13:20:41 +0300 From: Ivan Zakharyaschev To: jch@ Subject: Re: vc-darcs: cons: Args out of range $ emacs --version GNU Emacs 24.3.1 Copyright (C) 2013 Free Software Foundation, Inc. -- Forwarded message -- Date: Wed, 9 Dec 2015 02:34:42 +0300 From: Ivan Zakharyaschev To: Juliusz Chroboczek Subject: Re: vc-darcs: cons: Args out of range 2015-12-08 18:20 UTC+03:00, Juliusz Chroboczek : Could you please say M-: (setq debug-on-error t) RET and send me a backtrace? Sure. I'm attaching it. -- Forwarded message -- Date: Wed, 9 Dec 2015 03:37:02 +0300 From: Ivan Zakharyaschev To: Juliusz Chroboczek Subject: Re: vc-darcs: cons: Args out of range So, the patch hash is SHA1 -- http://darcs.net/Internals/NamedPatch (via http://darcs.net/Internals/Hashes ). 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)... -- IvanDebugger entered--Lisp error: (args-out-of-range "fa1eff0e1163fc2c716cccb2f4ab9bffe21597c1" 0 61) substring("fa1eff0e1163fc2c716cccb2f4ab9bffe21597c1" 0 61) (cons (substring h 0 61) l) (setq l (cons (substring h 0 61) l)) (progn (setq l (cons (substring h 0 61) l))) (if h (progn (setq l (cons (substring h 0 61) l (let ((h (cdr (assoc (quote hash) (cadr e) (if h (progn (setq l (cons (substring h 0 61) l) (progn (let ((h (cdr (assoc (quote hash) (cadr e) (if h (progn (setq l (cons (substring h 0 61) l)) (if (and (consp e) (eq (car e) (quote patch))) (progn (let ((h (cdr (assoc (quote hash) (cadr e) (if h (progn (setq l (cons (substring h 0 61) l))) (let ((e (car (prog1 ch (setq ch (cdr ch)) (if (and (consp e) (eq (car e) (quote patch))) (progn (let ((h (cdr (assoc ... ... (if h (progn (setq l (cons ... l (while (not (null ch)) (let ((e (car (prog1 ch (setq ch (cdr ch)) (if (and (consp e) (eq (car e) (quote patch))) (progn (let ((h (cdr ...))) (if h (progn (setq l ... (let ((ch (cddr (car changes))) (l (quote nil))) (while (not (null ch)) (let ((e (car (prog1 ch (setq ch ...) (if (and (consp e) (eq (car e) (quote patch))) (progn (let ((h ...)) (if h (progn ...))) (nreverse l)) (let ((changes (xml-parse-region 1 (point-max (if (and (null (cdr changes)) (eq (quote changelog) (car (car changes nil (error "Unexpected output from darcs changes --xml.")) (let ((ch (cddr (car changes))) (l (quote nil))) (while (not (null ch)) (let ((e (car (prog1 ch ... (if (and (consp e) (eq (car e) (quote patch))) (progn (let (...) (if h ...)) (nreverse l))) (progn (apply (function vc-do-command) t 0 vc-darcs-program-name files "changes" "--xml" flags) (let ((changes (xml-parse-region 1 (point-max (if (and (null (cdr changes)) (eq (quote changelog) (car (car changes nil (error "Unexpected output from darcs changes --xml.")) (let ((ch (cddr (car changes))) (l (quote nil))) (while (not (null ch)) (let ((e (car ...))) (if (and (consp e) (eq ... ...)) (progn (let ... ...) (nreverse l (unwind-protect (progn (apply (function vc-do-command) t 0
Re: [darcs-users] vc-darcs.el and the length of hashes (cons: Args out of range)
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 ___ darcs-users mailing list darcs-users@darcs.net http://lists.osuosl.org/mailman/listinfo/darcs-users
[darcs-users] vc-darcs.el and the length of hashes (cons: Args out of range)
Ivan Zakharyaschev writes: > http://www.loveshack.ukfsn.org/emacs/vc-darcs.el -- is not available > because the site doesn't open.) That would be Dave Love's site, a long-time Emacs and Darcs contributor who stopped posting to Emacs channels about a decade ago, and I haven't seen him around Darcs channels for a handful of years, too. Googling for "Dave Love" and/or "loveshack and not B52s" ;-) might come up with an existing site. (Didn't see any on the first page with just "loveshack" and need to get back to $DAYJOB, sorry I can't be of more help.) Steve ___ darcs-users mailing list darcs-users@darcs.net http://lists.osuosl.org/mailman/listinfo/darcs-users