• R/O
  • SSH
  • HTTPS

fsvn: Commit


Commit MetaInfo

Revision321 (tree)
Time2015-07-01 11:19:59
Authormhayashi1120

Log Message

removing some vc advices.

Change Summary

Incremental Difference

--- trunk/fsvn-env.el (revision 320)
+++ trunk/fsvn-env.el (revision 321)
@@ -405,17 +405,9 @@
405405
406406
407407
408-(defun fsvn-vc-mode-p ()
409- "Is vc-svn active?"
410- (defvar vc-mode)
411- (and (boundp 'vc-mode)
412- (stringp vc-mode)
413- (string-match "\\` SVN" vc-mode)))
414-
415-(defun fsvn-vc-registered (file)
416- (vc-mode-line file)
417- (vc-registered file))
418-
408+(defun fsvn-current-buffer-unver-version-p ()
409+ (and default-directory
410+ (fsvn-directory-under-versioned-p default-directory)))
419411
420412
421413 (defun fsvn-lisp-save (value file)
--- trunk/ChangeLog (revision 320)
+++ trunk/ChangeLog (revision 321)
@@ -1,3 +1,7 @@
1+2015-03-18 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com>
2+
3+ * Fix: removing some vc advices.
4+
15 2015-03-10 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com>
26
37 * Fix: Check fsvn-process-list-display-p-function is function
--- trunk/fsvn-pub.el (revision 320)
+++ trunk/fsvn-pub.el (revision 321)
@@ -40,8 +40,6 @@
4040 (dired-goto-file around fsvn-dired-goto-file-ad)
4141 (dired-get-filename around fsvn-dired-get-filename-ad)
4242 (after-find-file around fsvn-after-find-file)
43- (vc-find-file-hook after fsvn-ui-fancy-vc-find-file-hook)
44- (vc-after-save after fsvn-ui-fancy-vc-after-save)
4543 (ediff-refresh-mode-lines around fsvn-ui-fancy-ediff-modeline-fixup)
4644 ))
4745
@@ -389,6 +387,8 @@
389387 ;; redraw mode-line `kill-all-local-varable' destroy after `vc-find-file'
390388 ;; advice
391389 (add-hook 'after-change-major-mode-hook 'fsvn-ui-fancy-redraw)
390+ (add-hook 'find-file-hook 'fsvn-ui-fancy-redraw)
391+ (add-hook 'after-save-hook 'fsvn-ui-fancy-redraw)
392392 ;; iswitchb ignore buffers
393393 (eval-after-load 'iswitchb
394394 `(let ((ignore-var (if iswitchb-buffer-ignore
@@ -406,6 +406,8 @@
406406 (setq file-name-handler-alist (delq file-handler file-name-handler-alist))
407407 (remove-hook 'pre-command-hook 'fsvn-magic-clear-cache-if-toplevel)
408408 (remove-hook 'after-change-major-mode-hook 'fsvn-ui-fancy-redraw)
409+ (remove-hook 'find-file-hook 'fsvn-ui-fancy-redraw)
410+ (remove-hook 'after-save-hook 'fsvn-ui-fancy-redraw)
409411 (when (boundp 'iswitchb-buffer-ignore-orig)
410412 (mapc
411413 (lambda (regexp)
--- trunk/fsvn.el (revision 320)
+++ trunk/fsvn.el (revision 321)
@@ -3,7 +3,7 @@
33
44 ;; Author: Masahiro Hayashi <mhayashi1120@gmail.com>
55 ;; URL: http://fsvn.sourceforge.jp/
6-;; Keywords: vc
6+;; Keywords: application
77 ;; Version: 0.9.13
88
99 ;; fsvn.el is free software; you can redistribute it and/or modify
@@ -31,7 +31,7 @@
3131 ;; Have following advantages of other Emacs svn client.
3232 ;; * tsvn:*, bugtraq:* like property supported. (or will be supported)
3333 ;; * Using `svn help' output for completing read.
34-;; * Fast in huge working copy by background process.
34+;; * Fast in huge working copy by background (asynchronous) process.
3535 ;; * Has repository browser.
3636 ;; * Has visualize blame/annotate/praise minor-mode.
3737 ;; * Has svk support
@@ -43,8 +43,8 @@
4343
4444 ;; This package is tested on following environment.
4545 ;; NTEmacs (based Emacs 23.3) on Windows. svn 1.6.x - 1.7.x
46-;; Emacs (24.3) on GNU/Linux (Debian). svn svn 1.6.x - 1.7.x
47-;; Emacs current (24.3.50) on GNU/Linux (Debian). svn 1.6.x - 1.7.x
46+;; Emacs (24.4) on GNU/Linux (Debian). svn svn 1.6.x - 1.8.x
47+;; Emacs current (25.0.50) on GNU/Linux (Debian). svn 1.6.x - 1.8.x
4848
4949 ;;; Code:
5050
--- trunk/fsvn-ui.el (revision 320)
+++ trunk/fsvn-ui.el (revision 321)
@@ -886,12 +886,12 @@
886886 (t
887887 (setcar (cdr mode) (fsvn-ui-fancy--modeline-picture color))))))
888888
889-(defun fsvn-ui-fancy--update-modeline ()
889+(defun fsvn-ui-fancy--update-modeline (&optional status)
890890 "Update modeline state dot mark properly"
891891 (fsvn-let*
892892 ((buffer-file-name)
893- ((fsvn-vc-mode-p))
894- (status (fsvn-ui-fancy--get-status buffer-file-name)))
893+ ((fsvn-current-buffer-unver-version-p))
894+ (status (or status (fsvn-ui-fancy--get-status buffer-file-name))))
895895 (fsvn-ui-fancy--update-state-mark status)))
896896
897897 (defun fsvn-ui-fancy--get-status (file)
@@ -900,6 +900,9 @@
900900 (val (fsvn-xml-status->target->entry=>wc-status.item status)))
901901 val))
902902
903+(defun fsvn-ui-fancy--color-exists-p (status)
904+ (not (memq status '(unversioned))))
905+
903906 (defun fsvn-ui-fancy--interpret-state-mode-color (val)
904907 "Interpret vc-svn-state symbol to mode line color"
905908 (cond
@@ -917,14 +920,6 @@
917920 (t
918921 "GreenYellow")))
919922
920-(defadvice vc-find-file-hook (after fsvn-ui-fancy-vc-find-file-hook disable)
921- "vc-find-file-hook advice for synchronizing psvn with vc-svn interface"
922- (fsvn-ui-fancy-redraw))
923-
924-(defadvice vc-after-save (after fsvn-ui-fancy-vc-after-save disable)
925- "vc-after-save advice for synchronizing psvn when saving buffer"
926- (fsvn-ui-fancy-redraw))
927-
928923 (defadvice ediff-refresh-mode-lines
929924 (around fsvn-ui-fancy-ediff-modeline-fixup disable compile)
930925 "Fixup svn file status in the modeline when using ediff"
@@ -939,12 +934,16 @@
939934 (fsvn-ui-fancy--update-modeline)))
940935
941936 (defun fsvn-ui-fancy-redraw ()
942- (cond
943- ((and fsvn-ui-fancy-file-state-in-modeline
944- (fsvn-vc-mode-p))
945- (fsvn-ui-fancy--update-modeline))
946- (t
947- (fsvn-ui-fancy--uninstall-state-mark))))
937+ (let (status)
938+ (cond
939+ ((and fsvn-ui-fancy-file-state-in-modeline
940+ buffer-file-name
941+ (fsvn-current-buffer-unver-version-p)
942+ (setq status (fsvn-ui-fancy--get-status buffer-file-name))
943+ (fsvn-ui-fancy--color-exists-p status))
944+ (fsvn-ui-fancy--update-modeline status))
945+ (t
946+ (fsvn-ui-fancy--uninstall-state-mark)))))
948947
949948 (defun fsvn-ui-fancy-install ()
950949 (fsvn-let*
@@ -951,9 +950,8 @@
951950 ((fsvn-ui-fancy-file-state-in-modeline)
952951 (file buffer-file-name)
953952 (status (fsvn-ui-fancy--get-status file))
953+ ((fsvn-ui-fancy--color-exists-p status))
954954 (color (fsvn-ui-fancy--interpret-state-mode-color status)))
955- ;; fancy mode line depend on vc
956- (fsvn-vc-registered file)
957955 (fsvn-ui-fancy--install-state-mark color)))
958956
959957
Show on old repository browser