diff options
| author | Stefan Monnier | 2013-01-08 12:34:35 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2013-01-08 12:34:35 -0500 |
| commit | 1c851e98b60d08404e5138b67ccf5b9d72fb4e47 (patch) | |
| tree | bdd94678dd1dcf59d33e2015c646d54bd9209d9a | |
| parent | 63a63bd4346fb2c0d5382ae37b515cdbd33fbf17 (diff) | |
| download | emacs-1c851e98b60d08404e5138b67ccf5b9d72fb4e47.tar.gz emacs-1c851e98b60d08404e5138b67ccf5b9d72fb4e47.zip | |
* lisp/vc/pcvs.el (cvs-cleanup-collection): Extend meaning of `rm-handled'.
(cvs-mode-remove-handled): Use it.
Fixes: debbugs:13380
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/vc/pcvs.el | 20 |
2 files changed, 14 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3c1a51855ab..18481cb5aa5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2013-01-08 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2013-01-08 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * vc/pcvs.el (cvs-cleanup-collection): Extend meaning of `rm-handled'. | ||
| 4 | (cvs-mode-remove-handled): Use it (bug#13380). | ||
| 5 | |||
| 3 | * emacs-lisp/nadvice.el (advice--tweak): New function. | 6 | * emacs-lisp/nadvice.el (advice--tweak): New function. |
| 4 | (advice--remove-function, advice--subst-main): Use it. | 7 | (advice--remove-function, advice--subst-main): Use it. |
| 5 | 8 | ||
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el index 52dc7edfa2d..208b93d9670 100644 --- a/lisp/vc/pcvs.el +++ b/lisp/vc/pcvs.el | |||
| @@ -856,7 +856,8 @@ the problem." | |||
| 856 | (defun cvs-cleanup-collection (c rm-handled rm-dirs rm-msgs) | 856 | (defun cvs-cleanup-collection (c rm-handled rm-dirs rm-msgs) |
| 857 | "Remove undesired entries. | 857 | "Remove undesired entries. |
| 858 | C is the collection | 858 | C is the collection |
| 859 | RM-HANDLED if non-nil means remove handled entries. | 859 | RM-HANDLED if non-nil means remove handled entries (if file is currently |
| 860 | visited, only remove if value is `all'). | ||
| 860 | RM-DIRS behaves like `cvs-auto-remove-directories'. | 861 | RM-DIRS behaves like `cvs-auto-remove-directories'. |
| 861 | RM-MSGS if non-nil means remove messages." | 862 | RM-MSGS if non-nil means remove messages." |
| 862 | (let (last-fi first-dir (rerun t)) | 863 | (let (last-fi first-dir (rerun t)) |
| @@ -870,16 +871,17 @@ RM-MSGS if non-nil means remove messages." | |||
| 870 | (subtype (cvs-fileinfo->subtype fi)) | 871 | (subtype (cvs-fileinfo->subtype fi)) |
| 871 | (keep | 872 | (keep |
| 872 | (pcase type | 873 | (pcase type |
| 873 | ;; remove temp messages and keep the others | 874 | ;; Remove temp messages and keep the others. |
| 874 | (`MESSAGE (not (or rm-msgs (eq subtype 'TEMP)))) | 875 | (`MESSAGE (not (or rm-msgs (eq subtype 'TEMP)))) |
| 875 | ;; remove entries | 876 | ;; Remove dead entries. |
| 876 | (`DEAD nil) | 877 | (`DEAD nil) |
| 877 | ;; handled also? | 878 | ;; Handled also? |
| 878 | (`UP-TO-DATE | 879 | (`UP-TO-DATE |
| 879 | (if (find-buffer-visiting (cvs-fileinfo->full-name fi)) | 880 | (not |
| 880 | t | 881 | (if (find-buffer-visiting (cvs-fileinfo->full-name fi)) |
| 881 | (not rm-handled))) | 882 | (eq rm-handled 'all) |
| 882 | ;; keep the rest | 883 | rm-handled))) |
| 884 | ;; Keep the rest. | ||
| 883 | (_ (not (run-hook-with-args-until-success | 885 | (_ (not (run-hook-with-args-until-success |
| 884 | 'cvs-cleanup-functions fi)))))) | 886 | 'cvs-cleanup-functions fi)))))) |
| 885 | 887 | ||
| @@ -2121,7 +2123,7 @@ if you are convinced that the process that created the lock is dead." | |||
| 2121 | Empty directories are removed." | 2123 | Empty directories are removed." |
| 2122 | (interactive) | 2124 | (interactive) |
| 2123 | (cvs-cleanup-collection cvs-cookies | 2125 | (cvs-cleanup-collection cvs-cookies |
| 2124 | t (or cvs-auto-remove-directories 'handled) t)) | 2126 | 'all (or cvs-auto-remove-directories 'handled) t)) |
| 2125 | 2127 | ||
| 2126 | 2128 | ||
| 2127 | (defun-cvs-mode cvs-mode-acknowledge () | 2129 | (defun-cvs-mode cvs-mode-acknowledge () |