[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110794: * lisp/vc/vc-svn.el (vc-svn-
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110794: * lisp/vc/vc-svn.el (vc-svn-state-heuristic): Avoid calling svn. |
Date: |
Sat, 03 Nov 2012 21:13:13 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110794
fixes bug: http://debbugs.gnu.org/7850
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2012-11-03 21:13:13 -0700
message:
* lisp/vc/vc-svn.el (vc-svn-state-heuristic): Avoid calling svn.
modified:
lisp/ChangeLog
lisp/vc/vc-svn.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-11-04 03:25:18 +0000
+++ b/lisp/ChangeLog 2012-11-04 04:13:13 +0000
@@ -1,3 +1,7 @@
+2012-11-04 Glenn Morris <address@hidden>
+
+ * vc/vc-svn.el (vc-svn-state-heuristic): Avoid calling svn. (Bug#7850)
+
2012-11-04 Chong Yidong <address@hidden>
* bookmark.el (bookmark-bmenu-switch-other-window): Avoid binding
=== modified file 'lisp/vc/vc-svn.el'
--- a/lisp/vc/vc-svn.el 2012-02-25 04:29:09 +0000
+++ b/lisp/vc/vc-svn.el 2012-11-04 04:13:13 +0000
@@ -155,9 +155,24 @@
(vc-svn-command t 0 file "status" (if localp "-v" "-u"))
(vc-svn-parse-status file))))
+;; NB this does not handle svn properties, which can be changed
+;; without changing the file timestamp.
+;; Note that unlike vc-cvs-state-heuristic, this is not called from
+;; vc-svn-state. AFAICS, it is only called from vc-state-refresh via
+;; vc-after-save (bug#7850). Therefore the fact that it ignores
+;; properties is irrelevant. If you want to make vc-svn-state call
+;; this, it should be extended to handle svn properties.
(defun vc-svn-state-heuristic (file)
"SVN-specific state heuristic."
- (vc-svn-state file 'local))
+ ;; If the file has not changed since checkout, consider it `up-to-date'.
+ ;; Otherwise consider it `edited'. Copied from vc-cvs-state-heuristic.
+ (let ((checkout-time (vc-file-getprop file 'vc-checkout-time))
+ (lastmod (nth 5 (file-attributes file))))
+ (cond
+ ((equal checkout-time lastmod) 'up-to-date)
+ ((string= (vc-working-revision file) "0") 'added)
+ ((null checkout-time) 'unregistered)
+ (t 'edited))))
;; FIXME it would be better not to have the "remote" argument,
;; but to distinguish the two output formats based on content.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110794: * lisp/vc/vc-svn.el (vc-svn-state-heuristic): Avoid calling svn.,
Glenn Morris <=