[svk-commit] r2689 - trunk/utils

nobody at bestpractical.com nobody at bestpractical.com
Thu Jan 24 11:59:40 EST 2008


Author: clkao
Date: Thu Jan 24 11:59:40 2008
New Revision: 2689

Modified:
   trunk/utils/vc-svk.el

Log:
2007-10-24  Akinori MUSHA  <knu at 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.


Modified: trunk/utils/vc-svk.el
==============================================================================
--- trunk/utils/vc-svk.el	(original)
+++ trunk/utils/vc-svk.el	Thu Jan 24 11:59:40 2008
@@ -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))))))


More information about the svk-commit mailing list