diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-10-20 07:56:20 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-10-20 07:56:20 +0000 |
commit | bc8c1bb4484f8f33dba11be10bedbc66b9664f5f (patch) | |
tree | d11cf0da0639c6f5b98f9eff498169f7a01c8281 /lisp/vc-svn.el | |
parent | 7e2839b1651207b78013e3c56d2724270587114f (diff) | |
download | emacs-bc8c1bb4484f8f33dba11be10bedbc66b9664f5f.tar.gz |
(vc-svn-parse-status): Remove unused arg `localp'.
Add arg `filename' instead. Don't set vc-backend if `filename' is set.
Return `filename's status if applicable. Update callers.
Diffstat (limited to 'lisp/vc-svn.el')
-rw-r--r-- | lisp/vc-svn.el | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index 6d27c5c6a7e..c48ce7a5f99 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -125,8 +125,7 @@ This is only meaningful if you don't use the implicit checkout model ;; 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'." @@ -134,8 +133,7 @@ This is only meaningful if you don't use the implicit checkout model (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." @@ -149,7 +147,7 @@ This is only meaningful if you don't use the implicit checkout model ;; 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'." @@ -488,10 +486,10 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." ;; 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 @@ -500,7 +498,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)) @@ -522,7 +522,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." |