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: Sun, 04 Nov 2012 00:22:01 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Version: 24.4

Glenn Morris wrote:

> 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.

I was asked to commit this, so I looked at it again and concluded that
the fact that it does not handle svn properties is irrelevant.

AFAICS (I find vc.el rather opaque), it is _only_ called from
vc-state-refresh in vc-after-save. When a file is first visited,
vc-svn-registered is called, which explicitly calls "svn status".

I think that the only consequence of this change is that eg adding a
character, deleting it, and then saving the file will now mark the
buffer as VC modified. Previously, it did not. Presumably CVS has always
behaved like this, and I don't recall seeing any complaints about that.






reply via email to

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