Emacs VC library for darcs (the one maintained by Juliusz Chroboczek with my patches) (http://www.pps.univ-paris-diderot.fr/~jch/software/repos/vc-darcs)
- page 1 of 6
- next ->
I've described this problem in http://lists.osuosl.org/pipermail/darcs-users/2015-December/027155.html . | imz | Tue Dec 15 07:32:16 UTC 2015 |
do not loose the fullname in records when EMAIL etc. does not contain it I've explained this problem in more detail in http://lists.osuosl.org/pipermail/darcs-users/2015-December/027157.html: Another problem I've noticed with the vc-darcs.el from jch@ is that it doesn't use the author's fullname when recording changes. This has been discovered thanks to a warning by "darcs amend". Let's have a look how the code of vc-darcs.el could be fixed. (I'll post if I come up with something.) Here is an example session demonstrating the problem: ~/tests $ mkdir test-darcs ~/tests $ cd test-darcs/ ~/tests/test-darcs $ darcs init Repository initialized. ~/tests/test-darcs $ echo a > a ~/tests/test-darcs $ darcs add a Adding 'a' ~/tests/test-darcs $ darcs rec addfile ./a Shall I record this change? (1/2) [ynW...], or ? for more options: y hunk ./a 1 - +a Shall I record this change? (2/2) [ynW...], or ? for more options: y Do you want to record these changes? [Yglqk...], or ? for more options: y Finished recording patch 'A.' ~/tests/test-darcs $ (On the last step above, there is another minor problem -- probably caused by vc-darcs.el, since I didn't experience it before starting to use vc-darcs.el: Emacs is started to edit the message (as before), but the buffer (named something like _DARCS_PATCH:...) is read-only. I had to do C-x C-q to be able to edit it.) Now, let's use Emacs VC to make and record a change: edit the file in Emacs, and C-x v v Then, I tried to amend the last change: ~/tests/test-darcs $ echo c > a ~/tests/test-darcs $ darcs amend patch 81d803550190efdbf33b3b0e61915ea30bcda416 Author: imz@altlinux.org Date: Tue Dec 15 06:24:57 MSK 2015 * B. Shall I amend this patch? [yNjk...], or ? for more options: y hunk ./a 1 -b - +c Shall I record this change? (1/1) [ynW...], or ? for more options: y Do you want to record these changes? [Yglqk...], or ? for more options: y You're not imz@altlinux.org! Amend anyway? withSignalsHandled: Interrupted! interrupt ~/tests/test-darcs $ You see, there is a warning. And here is the reason: ~/tests/test-darcs $ darcs log patch 81d803550190efdbf33b3b0e61915ea30bcda416 Author: imz@altlinux.org Date: Tue Dec 15 06:24:57 MSK 2015 * B. patch d3d9ad100dffc3ece9c042712c87750b04cf941c Author: Ivan Zakharyaschev imz@altlinux.org Date: Tue Dec 15 06:18:27 MSK 2015 * A. ~/tests/test-darcs $ The last recorded change (with Emacs VC) doesn't have the fullname. Let's have a look at the code of `vc-darcs-checkin':
It refers only to `vc-darcs-mail-address', which is: vc-darcs-mail-address is a variable defined in `vc-darcs.el'. Its value is "imz@altlinux.org"; Documentation: *The email address to use in darcs. There is no fullname here. It's defined like this: (defcustom vc-darcs-mail-address (or (getenv "DARCS_EMAIL") (getenv "EMAIL") (if (string-match "<" user-mail-address) user-mail-address (format "%s <%s>" (user-full-name) user-mail-address))) "*The email address to use in darcs." :type '(choice string (const nil)) :group 'vc-darcs) So it makes an attempt to insert the fullname, but in my case it fails. Well, I have it written down in ~/.darcs/author, that why darcs knows it: Ivan Zakharyaschev imz@altlinux.org And "finger" (after I've just installed it) also knows it: $ /usr/bin/finger imz | head -1 Login: imz Name: Ivan Zakharyaschev And even (user-full-name) evaluates correctly. So, the reason is that EMAIL environment variable is set to just the plain address (without the fullname). I'm not sure, but that may be because Git (or perhars darcs) expects it to be that way, so I've set it like this. If that is a common possibility, I think that the value of EMAIL in the above code should be treated similarly to `user-mail-address' (with a check for "<"). Hence, the suggested fix: diff -rN -u old-vc-darcs/vc-darcs.el new-vc-darcs/vc-darcs.el --- old-vc-darcs/vc-darcs.el 2015-12-15 07:47:00.563953863 +0300 +++ new-vc-darcs/vc-darcs.el 2015-12-15 07:47:00.563953863 +0300 @@ -97,12 +97,13 @@ :group 'vc-darcs) (defcustom vc-darcs-mail-address - (or (getenv "DARCS_EMAIL") - (getenv "EMAIL") - (if (string-match "<" user-mail-address) - user-mail-address - (format "%s <%s>" - (user-full-name) user-mail-address))) + (let ((addr (or (getenv "DARCS_EMAIL") + (getenv "EMAIL") + user-mail-address))) + (if (string-match "<" addr) + addr + (format "%s <%s>" + (user-full-name) addr))) "*The email address to use in darcs." :type '(choice string (const nil)) :group 'vc-darcs) | imz | Tue Dec 15 06:51:09 UTC 2015 |
Sat Nov 22 21:27:10 UTC 2014 | ||
Sat Nov 22 21:26:46 UTC 2014 | ||
Sat Nov 22 21:25:51 UTC 2014 | ||
Sat Nov 22 21:05:57 UTC 2014 | ||
Sat Nov 22 21:05:42 UTC 2014 | ||
Sat Nov 22 21:04:57 UTC 2014 | ||
Sat Nov 15 19:27:04 UTC 2014 | ||
Sat Nov 15 19:26:57 UTC 2014 | ||
Sat Nov 15 19:26:40 UTC 2014 | ||
Sat May 31 13:45:32 UTC 2014 | ||
Sat May 31 13:45:29 UTC 2014 | ||
Call darcs changes with --max-count 1 when suitable. Minor optimisation. Unfortunately, we cannot easily do that in vc-darcs-changes, since for stability reasons we want the last match, not the first one. | Sat May 31 13:41:51 UTC 2014 | |
Fri May 23 23:01:55 UTC 2014 | ||
Fri May 23 23:01:32 UTC 2014 | ||
Wed May 21 22:52:21 UTC 2014 | ||
Wed May 21 22:49:54 UTC 2014 | ||
Wed May 21 22:49:32 UTC 2014 | ||
Wed May 21 22:40:54 UTC 2014 | ||
Wed May 21 22:39:19 UTC 2014 | ||
Wed May 21 22:36:33 UTC 2014 | ||
Wed May 21 18:45:52 UTC 2014 | ||
Wed May 21 18:45:18 UTC 2014 | ||
Wed May 21 18:22:37 UTC 2014 | ||
Add some support for viewing logs. This is not quite complete yet -- we cannot easily determine the exact patch from a Darcs log. | Wed May 21 18:13:09 UTC 2014 | |
Wed May 21 16:27:23 UTC 2014 | ||
Wed May 21 15:14:22 UTC 2014 | ||
Wed May 21 15:10:12 UTC 2014 | ||
Wed May 21 13:11:46 UTC 2014 |
- page 1 of 6
- next ->