CVS update by scop packages/unsupported/scop/vc ...

xemacs-cvs at xemacs.org xemacs-cvs at xemacs.org
Wed Oct 25 08:09:03 EDT 2006


  User: scop    
  Date: 06/10/25 14:09:03

  Modified:    packages/unsupported/scop/vc ChangeLog vc.el vc-svn.el
Log:
Sync vc with upstream.

Revision  Changes    Path
1.76      +1 -1      XEmacs/packages/unsupported/scop/STATUS

Index: STATUS
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/STATUS,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -p -r1.75 -r1.76
--- STATUS	2006/10/15 18:58:53	1.75
+++ STATUS	2006/10/25 12:08:56	1.76
@@ -17,7 +17,7 @@ generic-modes: generic.el and generic-x.
 - Compiles, seems to work, auto-mode-alist and autoloads may need spanking.
 
 vc: vc*.el and a few other related files from GNU Emacs, vc-git.el from git
-- Up to date with GNU Emacs CVS HEAD, git upstream as of 2006-10-15.
+- Up to date with GNU Emacs CVS HEAD, git upstream as of 2006-10-25.
 - Approaching usable state.
 - smerge-mode.el needs work.
 - Causes autoload related crashing with 21.4.x, more info:



1.64      +5 -0      XEmacs/packages/unsupported/scop/vc/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/ChangeLog,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -p -r1.63 -r1.64
--- ChangeLog	2006/10/15 18:56:55	1.63
+++ ChangeLog	2006/10/25 12:09:02	1.64
@@ -1,3 +1,8 @@
+2006-10-25  Ville Skyttä  <scop at xemacs.org>
+
+	* vc.el: Sync with upstream.
+	* vc-svn.el: Ditto.
+
 2006-10-15  Ville Skyttä  <scop at xemacs.org>
 
 	* vc-git.el: Sync with upstream.



1.36      +26 -19    XEmacs/packages/unsupported/scop/vc/vc.el

Index: vc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc.el,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -p -r1.35 -r1.36
--- vc.el	2006/08/16 20:44:35	1.35
+++ vc.el	2006/10/25 12:09:02	1.36
@@ -2712,25 +2712,32 @@ To get a prompt, use a prefix argument."
         (error "There is no version-controlled file in this buffer"))
     (let ((backend (vc-backend buffer-file-name))
 	  (backends nil))
-      (unless backend
-        (error "File %s is not under version control" buffer-file-name))
-      ;; Find the registered backends.
-      (dolist (backend vc-handled-backends)
-	(when (vc-call-backend backend 'registered buffer-file-name)
-	  (push backend backends)))
-      ;; Find the next backend.
-      (let ((def (car (delq backend (append (memq backend backends) backends))))
-	    (others (delete backend backends)))
-	(cond
-	 ((null others) (error "No other backend to switch to"))
-	 (current-prefix-arg
-	  (intern
-	   (upcase
-	    (completing-read
-	     (format "Switch to backend [%s]: " def)
-	     (mapcar (lambda (b) (list (downcase (symbol-name b)))) backends)
-	     nil t nil nil (downcase (symbol-name def))))))
-       (t def))))))
+      (unwind-protect
+	  (progn
+	    (unless backend
+	      (error "File %s is not under version control" buffer-file-name))
+	    ;; Find the registered backends.
+	    (dolist (backend vc-handled-backends)
+	      (when (vc-call-backend backend 'registered buffer-file-name)
+		(push backend backends)))
+	    ;; Find the next backend.
+	    (let ((def (car (delq backend
+				  (append (memq backend backends) backends))))
+		  (others (delete backend backends)))
+	      (cond
+	       ((null others) (error "No other backend to switch to"))
+	       (current-prefix-arg
+		(intern
+		 (upcase
+		  (completing-read
+		   (format "Switch to backend [%s]: " def)
+		   (mapcar (lambda (b) (list (downcase (symbol-name b)))) backends)
+		   nil t nil nil (downcase (symbol-name def))))))
+	       (t def))))
+	;; Calling the `registered' method can mess up the file
+	;; properties, so we want to revert them to what they were.
+	(if (and backend (delete backend backends))
+	    (vc-call-backend backend 'registered buffer-file-name))))))
   (unless (eq backend (vc-backend file))
     (vc-file-clearprops file)
     (vc-file-setprop file 'vc-backend backend)



1.15      +11 -10    XEmacs/packages/unsupported/scop/vc/vc-svn.el

Index: vc-svn.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc-svn.el,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- vc-svn.el	2006/02/10 23:25:43	1.14
+++ vc-svn.el	2006/10/25 12:09:02	1.15
@@ -126,8 +126,7 @@ This is only meaningful if you don't use
                ;; an `error' by vc-do-command.
                (error nil))))
         (when (eq 0 status)
-          (vc-svn-parse-status t)
-          (eq 'SVN (vc-file-getprop file 'vc-backend)))))))
+          (vc-svn-parse-status file))))))
 
 (defun vc-svn-state (file &optional localp)
   "SVN-specific version of `vc-state'."
@@ -135,8 +134,7 @@ This is only meaningful if you don't use
   (with-temp-buffer
     (cd (file-name-directory file))
     (vc-svn-command t 0 file "status" (if localp "-v" "-u"))
-    (vc-svn-parse-status localp)
-    (vc-file-getprop file 'vc-state)))
+    (vc-svn-parse-status file)))
 
 (defun vc-svn-state-heuristic (file)
   "SVN-specific state heuristic."
@@ -150,7 +148,7 @@ This is only meaningful if you don't use
     ;; enough.  Otherwise it might fail with remote repositories.
     (with-temp-buffer
       (vc-svn-command t 0 nil "status" (if localp "-v" "-u"))
-      (vc-svn-parse-status localp))))
+      (vc-svn-parse-status))))
 
 (defun vc-svn-workfile-version (file)
   "SVN-specific version of `vc-workfile-version'."
@@ -494,10 +492,10 @@ and that it passes `vc-svn-global-switch
       ;; behavior for different modules on the same server.
       (match-string 1))))
 
-(defun vc-svn-parse-status (localp)
+(defun vc-svn-parse-status (&optional filename)
   "Parse output of \"svn status\" command in the current buffer.
-Set file properties accordingly.  Unless FULL is t, parse only
-essential information."
+Set file properties accordingly.  Unless FILENAME is non-nil, parse only
+information about FILENAME and return its status."
   (let (file status)
     (goto-char (point-min))
     (while (re-search-forward
@@ -506,7 +504,9 @@ essential information."
 		  (buffer-substring (point) (line-end-position))))
       (setq status (char-after (line-beginning-position)))
       (unless (eq status ??)
-	(vc-file-setprop file 'vc-backend 'SVN)
+	;; `vc-BACKEND-registered' must not set vc-backend,
+	;; which is instead set in vc-registered.
+	(unless filename (vc-file-setprop file 'vc-backend 'SVN))
 	;; Use the last-modified revision, so that searching in vc-print-log
 	;; output works.
 	(vc-file-setprop file 'vc-workfile-version (match-string 3))
@@ -528,7 +528,8 @@ essential information."
 	   (if (eq (char-after (match-beginning 1)) ?*)
 	       'needs-merge
 	     'edited))
-	  (t 'edited)))))))
+	  (t 'edited)))))
+    (if filename (vc-file-getprop filename 'vc-state))))
 
 (defun vc-svn-dir-state-heuristic (dir)
   "Find the SVN state of all files in DIR, using only local information."





More information about the XEmacs-CVS mailing list