Skip Menu |

This queue is for tickets about the svk CPAN distribution.

Report information
The Basics
Id: 30242
Status: resolved
Priority: 0/
Queue: svk

People
Owner: Nobody in particular
Requestors: knu [...] iDaemons.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: fixing vc-svk.el slowness
Date: Wed, 24 Oct 2007 21:59:33 +0900
To: bug-svk [...] rt.cpan.org
From: "Akinori MUSHA" <knu [...] iDaemons.org>
Hi, I'm having a very annoying problem with vc-svk.el, which makes Emacs so slow in opening a new file. Attached is a patch that fixes it by getting cache to work. Environment Information: SVK 2.0.2 / Subversion 1.4.4 / Perl 5.8.8 Emacs 23.0.51.4 w/ multi-tty patch Mac OS X 10.4.10 and FreeBSD 6.2-STABLE Regards, -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "Different eyes see different things, Different hearts beat on different strings -- But there are times for you and me when all such things agree" 2007-10-24 Akinori MUSHA <knu@iDaemons.org> * utils/vc-svk.el (vc-svk-co-paths): Fix wrong timestamp comparison. * utils/vc-svk.el (vc-svk-co-paths): Save timestamp after invoking `svk checkout --list' as it updates ~/.svk/config. * utils/vc-svk.el (vc-svk-co-paths): Fix a regex pattern where unwanted spaces are captured by greedy match. Index: vc-svk.el =================================================================== --- vc-svk.el (revision 2557) +++ vc-svk.el (working copy) @@ -768,17 +768,20 @@ (let ((config "~/.svk/config") mtime) (when (file-readable-p config) - (setq mtime (nth 5 (file-attributes "~/.svk/config"))) + (setq mtime (nth 5 (file-attributes config))) (unless (and vc-svk-co-paths ; has not it been loaded? - (vc-svk-time-less-p mtime ; is it unmodified since? - (car vc-svk-co-paths))) + (not ; is it unmodified since? + (vc-svk-time-less-p (car vc-svk-co-paths) mtime))) ;; (re)load - (setq vc-svk-co-paths (list mtime)) (with-temp-buffer (vc-svk-command t 0 nil "checkout" "--list") + ;; `svk checkout --list' modifies ~/.svk/config somehow, so + ;; you have to stat it again. + (setq mtime (nth 5 (file-attributes config))) + (setq vc-svk-co-paths (list mtime)) (goto-char (point-min)) (when (search-forward "==========\n" nil t) - (while (re-search-forward "^ +\\(.+\\) *\t\\(.+\\)$" nil t) + (while (re-search-forward "^ +\\(.+?\\) *\t\\(.+\\)$" nil t) (add-to-list 'vc-svk-co-paths (list (match-string-no-properties 2) (match-string-no-properties 1))))))
Download (untitled)
application/pgp-signature 187b

Message body not shown because it is not plain text.