Skip trash argument for delete-directory function.

Emacs <= 23 does not support this argument.
This commit is contained in:
Johan Andersson 2014-02-15 14:52:19 +01:00
parent f26b586c01
commit 771e764786

View file

@ -269,7 +269,7 @@ seconds; the server cuts off after 10 requests in 20 seconds.")
(pb/run-process dir "darcs" "pull")) (pb/run-process dir "darcs" "pull"))
(t (t
(when (file-exists-p dir) (when (file-exists-p dir)
(delete-directory dir t nil)) (delete-directory dir t))
(pb/princ-checkout repo dir) (pb/princ-checkout repo dir)
(pb/run-process nil "darcs" "get" repo dir))) (pb/run-process nil "darcs" "get" repo dir)))
(apply 'pb/run-process dir "darcs" "changes" "--max-count" "1" (apply 'pb/run-process dir "darcs" "changes" "--max-count" "1"
@ -307,7 +307,7 @@ seconds; the server cuts off after 10 requests in 20 seconds.")
(pb/run-process dir "svn" "up")) (pb/run-process dir "svn" "up"))
(t (t
(when (file-exists-p dir) (when (file-exists-p dir)
(delete-directory dir t nil)) (delete-directory dir t))
(pb/princ-checkout repo dir) (pb/princ-checkout repo dir)
(pb/run-process nil "svn" "checkout" repo dir))) (pb/run-process nil "svn" "checkout" repo dir)))
(apply 'pb/run-process dir "svn" "info" (apply 'pb/run-process dir "svn" "info"
@ -337,7 +337,7 @@ Return a cons cell whose `car' is the root and whose `cdr' is the repository."
(pb/run-process dir "cvs" "update" "-dP")) (pb/run-process dir "cvs" "update" "-dP"))
(t (t
(when (file-exists-p dir) (when (file-exists-p dir)
(delete-directory dir t nil)) (delete-directory dir t))
(pb/princ-checkout (format "%s from %s" repo root) dir) (pb/princ-checkout (format "%s from %s" repo root) dir)
;; CVS insists on relative paths as target directory for checkout (for ;; CVS insists on relative paths as target directory for checkout (for
;; whatever reason), and puts "CVS" directories into every subdirectory ;; whatever reason), and puts "CVS" directories into every subdirectory
@ -385,7 +385,7 @@ Return a cons cell whose `car' is the root and whose `cdr' is the repository."
(pb/run-process dir "git" "remote" "update")) (pb/run-process dir "git" "remote" "update"))
(t (t
(when (file-exists-p dir) (when (file-exists-p dir)
(delete-directory dir t nil)) (delete-directory dir t))
(pb/princ-checkout repo dir) (pb/princ-checkout repo dir)
(pb/run-process nil "git" "clone" repo dir))) (pb/run-process nil "git" "clone" repo dir)))
(pb/run-process dir "git" "reset" "--hard" (pb/run-process dir "git" "reset" "--hard"
@ -421,7 +421,7 @@ Return a cons cell whose `car' is the root and whose `cdr' is the repository."
(pb/run-process dir "bzr" "merge")) (pb/run-process dir "bzr" "merge"))
(t (t
(when (file-exists-p dir) (when (file-exists-p dir)
(delete-directory dir t nil)) (delete-directory dir t))
(pb/princ-checkout repo dir) (pb/princ-checkout repo dir)
(pb/run-process nil "bzr" "branch" repo dir))) (pb/run-process nil "bzr" "branch" repo dir)))
(apply 'pb/run-process dir "bzr" "log" "-l1" (apply 'pb/run-process dir "bzr" "log" "-l1"
@ -446,7 +446,7 @@ Return a cons cell whose `car' is the root and whose `cdr' is the repository."
(pb/run-process dir "hg" "update")) (pb/run-process dir "hg" "update"))
(t (t
(when (file-exists-p dir) (when (file-exists-p dir)
(delete-directory dir t nil)) (delete-directory dir t))
(pb/princ-checkout repo dir) (pb/princ-checkout repo dir)
(pb/run-process nil "hg" "clone" repo dir))) (pb/run-process nil "hg" "clone" repo dir)))
(apply 'pb/run-process dir "hg" "log" "--style" "compact" "-l1" (apply 'pb/run-process dir "hg" "log" "--style" "compact" "-l1"
@ -924,7 +924,7 @@ Returns the archive entry for the package."
(pb/find-package-commentary pkg-source) (pb/find-package-commentary pkg-source)
package-name)) package-name))
(delete-directory pkg-tmp-dir t nil) (delete-directory pkg-tmp-dir t)
(pb/archive-entry pkg-info 'tar))) (pb/archive-entry pkg-info 'tar)))
(t (error "Unable to find files matching recipe patterns"))))) (t (error "Unable to find files matching recipe patterns")))))