Mercurial > emacs
changeset 96899:7df3d9a17631
(vc-arch-trim-make-sentinel): Use a closure.
(vc-arch-trim-one-revlib): Delete temp directories as well.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 22 Jul 2008 17:16:52 +0000 |
parents | 6521e10c7e45 |
children | d3f5f5665a50 |
files | lisp/ChangeLog lisp/vc-arch.el |
diffstat | 2 files changed, 17 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Jul 22 17:09:24 2008 +0000 +++ b/lisp/ChangeLog Tue Jul 22 17:16:52 2008 +0000 @@ -1,12 +1,15 @@ +2008-07-22 Stefan Monnier <monnier@iro.umontreal.ca> + + * vc-arch.el (vc-arch-trim-make-sentinel): Use a closure. + (vc-arch-trim-one-revlib): Delete temp directories as well. + 2008-07-22 Stephen Eglen <stephen@gnu.org> - * iswitchb.el (iswitchb-delim): New variable, suggested by Ted - Roden. + * iswitchb.el (iswitchb-delim): New variable, suggested by Ted Roden. 2008-07-22 Sven Joachim <svenjoac@gmx.de> (tiny change) - * vc-dir.el (vc-dir-recompute-file-state): Fix mismatched - paenthesis. + * vc-dir.el (vc-dir-recompute-file-state): Fix mismatched paenthesis. 2008-07-22 Miles Bader <miles@gnu.org> @@ -29,8 +32,7 @@ * menu-bar.el (menu-bar-line-wrapping-menu): Use Visual Line mode for "word wrap" command. - * simple.el (visual-line-mode): Disable - truncate-partial-width-windows. + * simple.el (visual-line-mode): Disable truncate-partial-width-windows. 2008-07-21 Dan Nicolaescu <dann@ics.uci.edu>
--- a/lisp/vc-arch.el Tue Jul 22 17:09:24 2008 +0000 +++ b/lisp/vc-arch.el Tue Jul 22 17:16:52 2008 +0000 @@ -488,16 +488,20 @@ (defun vc-arch-trim-make-sentinel (revs) (if (null revs) (lambda (proc msg) (message "VC-Arch trimming ... done")) - `(lambda (proc msg) - (message "VC-Arch trimming %s..." ',(file-name-nondirectory (car revs))) - (rename-file ,(car revs) ,(concat (car revs) "*rm*")) + (lexical-let ((revs revs)) + (lambda (proc msg) + (message "VC-Arch trimming %s..." (file-name-nondirectory (car revs))) + (rename-file (car revs) (concat (car revs) "*rm*")) (setq proc (start-process "vc-arch-trim" nil - "rm" "-rf" ',(concat (car revs) "*rm*"))) - (set-process-sentinel proc (vc-arch-trim-make-sentinel ',(cdr revs)))))) + "rm" "-rf" (concat (car revs) "*rm*"))) + (set-process-sentinel proc (vc-arch-trim-make-sentinel (cdr revs))))))) (defun vc-arch-trim-one-revlib (dir) "Delete half of the revisions in the revision library." (interactive "Ddirectory: ") + (let ((garbage (directory-files dir 'full "\\`,," 'nosort))) + (when garbage + (funcall (vc-arch-trim-make-sentinel garbage) nil nil))) (let ((revs (sort (delq nil (mapcar