bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7850: 23.2.91; emacs runs svn status -v after every file save


From: Glenn Morris
Subject: bug#7850: 23.2.91; emacs runs svn status -v after every file save
Date: Thu, 20 Jan 2011 21:39:25 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Steve Revilak wrote:

> When editing a file that is kept in svn version control, emacs runs
> "svn status -V FILE" each time the file's buffer is saved. Other vc
> backends do not exhibit this behavior. For example, the git backend
> does not run "git status" on save, and the cvs backend does not run
> "cvs status" on save.

This can be changed by altering the definition of vc-svn-state-heuristic.
Simply copying the CVS one seems fine (?). I don't think this is an
appropriate change for the coming Emacs 23.3 though.


*** lisp/vc-svn.el      2011-01-02 23:50:46 +0000
--- lisp/vc-svn.el      2011-01-21 02:28:37 +0000
***************
*** 156,162 ****
  
  (defun vc-svn-state-heuristic (file)
    "SVN-specific state heuristic."
!   (vc-svn-state file 'local))
  
  ;; FIXME it would be better not to have the "remote" argument,
  ;; but to distinguish the two output formats based on content.
--- 156,170 ----
  
  (defun vc-svn-state-heuristic (file)
    "SVN-specific state heuristic."
!   ;; 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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]