diff options
| author | Glenn Morris | 2012-11-03 21:13:13 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-11-03 21:13:13 -0700 |
| commit | 9749e2b071a93101b1f3199fcc8634b9cf99a088 (patch) | |
| tree | 66c2fcca28db67ed6c8d9d78e22d819d5fb7f3a3 | |
| parent | 8f31e74bc70d3da2947b81fbc671cb651ccdbabf (diff) | |
| download | emacs-9749e2b071a93101b1f3199fcc8634b9cf99a088.tar.gz emacs-9749e2b071a93101b1f3199fcc8634b9cf99a088.zip | |
* lisp/vc/vc-svn.el (vc-svn-state-heuristic): Avoid calling svn.
Fixes: debbugs:7850
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/vc/vc-svn.el | 17 |
2 files changed, 20 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ce4919afa2b..09f3a586b4f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-11-04 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * vc/vc-svn.el (vc-svn-state-heuristic): Avoid calling svn. (Bug#7850) | ||
| 4 | |||
| 1 | 2012-11-04 Chong Yidong <cyd@gnu.org> | 5 | 2012-11-04 Chong Yidong <cyd@gnu.org> |
| 2 | 6 | ||
| 3 | * bookmark.el (bookmark-bmenu-switch-other-window): Avoid binding | 7 | * bookmark.el (bookmark-bmenu-switch-other-window): Avoid binding |
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 6c2367c7ba6..3becd8950f1 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -155,9 +155,24 @@ If you want to force an empty list of arguments, use t." | |||
| 155 | (vc-svn-command t 0 file "status" (if localp "-v" "-u")) | 155 | (vc-svn-command t 0 file "status" (if localp "-v" "-u")) |
| 156 | (vc-svn-parse-status file)))) | 156 | (vc-svn-parse-status file)))) |
| 157 | 157 | ||
| 158 | ;; NB this does not handle svn properties, which can be changed | ||
| 159 | ;; without changing the file timestamp. | ||
| 160 | ;; Note that unlike vc-cvs-state-heuristic, this is not called from | ||
| 161 | ;; vc-svn-state. AFAICS, it is only called from vc-state-refresh via | ||
| 162 | ;; vc-after-save (bug#7850). Therefore the fact that it ignores | ||
| 163 | ;; properties is irrelevant. If you want to make vc-svn-state call | ||
| 164 | ;; this, it should be extended to handle svn properties. | ||
| 158 | (defun vc-svn-state-heuristic (file) | 165 | (defun vc-svn-state-heuristic (file) |
| 159 | "SVN-specific state heuristic." | 166 | "SVN-specific state heuristic." |
| 160 | (vc-svn-state file 'local)) | 167 | ;; If the file has not changed since checkout, consider it `up-to-date'. |
| 168 | ;; Otherwise consider it `edited'. Copied from vc-cvs-state-heuristic. | ||
| 169 | (let ((checkout-time (vc-file-getprop file 'vc-checkout-time)) | ||
| 170 | (lastmod (nth 5 (file-attributes file)))) | ||
| 171 | (cond | ||
| 172 | ((equal checkout-time lastmod) 'up-to-date) | ||
| 173 | ((string= (vc-working-revision file) "0") 'added) | ||
| 174 | ((null checkout-time) 'unregistered) | ||
| 175 | (t 'edited)))) | ||
| 161 | 176 | ||
| 162 | ;; FIXME it would be better not to have the "remote" argument, | 177 | ;; FIXME it would be better not to have the "remote" argument, |
| 163 | ;; but to distinguish the two output formats based on content. | 178 | ;; but to distinguish the two output formats based on content. |