emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111446: * lisp/vc/pcvs.el (cvs-clean


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111446: * lisp/vc/pcvs.el (cvs-cleanup-collection): Extend meaning of `rm-handled'.
Date: Tue, 08 Jan 2013 12:34:35 -0500
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111446
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13380
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2013-01-08 12:34:35 -0500
message:
  * lisp/vc/pcvs.el (cvs-cleanup-collection): Extend meaning of `rm-handled'.
  (cvs-mode-remove-handled): Use it.
modified:
  lisp/ChangeLog
  lisp/vc/pcvs.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-01-08 15:24:56 +0000
+++ b/lisp/ChangeLog    2013-01-08 17:34:35 +0000
@@ -1,5 +1,8 @@
 2013-01-08  Stefan Monnier  <address@hidden>
 
+       * vc/pcvs.el (cvs-cleanup-collection): Extend meaning of `rm-handled'.
+       (cvs-mode-remove-handled): Use it (bug#13380).
+
        * emacs-lisp/nadvice.el (advice--tweak): New function.
        (advice--remove-function, advice--subst-main): Use it.
 

=== modified file 'lisp/vc/pcvs.el'
--- a/lisp/vc/pcvs.el   2013-01-01 09:11:05 +0000
+++ b/lisp/vc/pcvs.el   2013-01-08 17:34:35 +0000
@@ -856,7 +856,8 @@
 (defun cvs-cleanup-collection (c rm-handled rm-dirs rm-msgs)
   "Remove undesired entries.
 C is the collection
-RM-HANDLED if non-nil means remove handled entries.
+RM-HANDLED if non-nil means remove handled entries (if file is currently
+  visited, only remove if value is `all').
 RM-DIRS behaves like `cvs-auto-remove-directories'.
 RM-MSGS if non-nil means remove messages."
   (let (last-fi first-dir (rerun t))
@@ -870,16 +871,17 @@
                  (subtype (cvs-fileinfo->subtype fi))
                  (keep
                   (pcase type
-                    ;; remove temp messages and keep the others
+                    ;; Remove temp messages and keep the others.
                     (`MESSAGE (not (or rm-msgs (eq subtype 'TEMP))))
-                    ;; remove entries
+                    ;; Remove dead entries.
                     (`DEAD nil)
-                    ;; handled also?
+                    ;; Handled also?
                     (`UP-TO-DATE
-                      (if (find-buffer-visiting (cvs-fileinfo->full-name fi))
-                          t
-                        (not rm-handled)))
-                    ;; keep the rest
+                      (not
+                       (if (find-buffer-visiting (cvs-fileinfo->full-name fi))
+                           (eq rm-handled 'all)
+                         rm-handled)))
+                    ;; Keep the rest.
                     (_ (not (run-hook-with-args-until-success
                              'cvs-cleanup-functions fi))))))
 
@@ -2121,7 +2123,7 @@
 Empty directories are removed."
   (interactive)
   (cvs-cleanup-collection cvs-cookies
-                         t (or cvs-auto-remove-directories 'handled) t))
+                         'all (or cvs-auto-remove-directories 'handled) t))
 
 
 (defun-cvs-mode cvs-mode-acknowledge ()


reply via email to

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