Use print for status info

This commit is contained in:
Donald Ephraim Curtis 2012-01-21 14:02:03 -06:00
parent 56a5161049
commit 12d88bf2bc

View file

@ -59,13 +59,13 @@
(with-current-buffer (get-buffer-create "*package-build-checkout*") (with-current-buffer (get-buffer-create "*package-build-checkout*")
(cond (cond
((file-exists-p dir) ((file-exists-p dir)
(message "checkout directory exists, updating...") (print "checkout directory exists, updating...")
(let ((default-directory dir)) (let ((default-directory dir))
(process-file (process-file
"darcs" nil "darcs" nil
(current-buffer) nil "pull"))) (current-buffer) nil "pull")))
(t (t
(message "cloning repository") (print "cloning repository")
(process-file (process-file
"darcs" nil "darcs" nil
(current-buffer) (current-buffer)
@ -75,11 +75,11 @@
"darcs" nil "darcs" nil
(current-buffer) (current-buffer)
t "changes" "--last" "1")) t "changes" "--last" "1"))
(message (print
(format-time-string (format-time-string
"%Y%m%d" "%Y%m%d"
(date-to-time (date-to-time
(message (progn (print (progn
(re-search-backward (re-search-backward
"\\([a-zA-Z]\\{3\\} [a-zA-Z]\\{3\\} \\( \\|[0-9]\\)[0-9] [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\} [A-Za-z]\\{3\\} [0-9]\\{4\\}\\)") "\\([a-zA-Z]\\{3\\} [a-zA-Z]\\{3\\} \\( \\|[0-9]\\)[0-9] [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\} [A-Za-z]\\{3\\} [0-9]\\{4\\}\\)")
(match-string-no-properties 1)))))))) (match-string-no-properties 1))))))))
@ -90,13 +90,13 @@
(goto-char (point-max)) (goto-char (point-max))
(cond (cond
((file-exists-p dir) ((file-exists-p dir)
(message "checkout directory exists, updating...") (print "checkout directory exists, updating...")
(let ((default-directory dir)) (let ((default-directory dir))
(process-file (process-file
"svn" nil "svn" nil
(current-buffer) nil "up"))) (current-buffer) nil "up")))
(t (t
(message "cloning repository") (print "cloning repository")
(process-file (process-file
"svn" nil "svn" nil
(current-buffer) (current-buffer)
@ -106,11 +106,11 @@
"svn" nil "svn" nil
(current-buffer) (current-buffer)
t "info")) t "info"))
(message (print
(format-time-string (format-time-string
"%Y%m%d" "%Y%m%d"
(date-to-time (date-to-time
(message (progn (print (progn
(re-search-backward (re-search-backward
"\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\)") "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\)")
(match-string-no-properties 1)))))))) (match-string-no-properties 1))))))))
@ -121,14 +121,14 @@
(goto-char (point-max)) (goto-char (point-max))
(cond (cond
((file-exists-p dir) ((file-exists-p dir)
(message "checkout directory exists, updating...") (print "checkout directory exists, updating...")
(let ((default-directory dir)) (let ((default-directory dir))
(process-file (process-file
"git" nil "git" nil
(current-buffer) nil "pull")) (current-buffer) nil "pull"))
) )
(t (t
(message "cloning %s to %s" repo dir) (print "cloning %s to %s" repo dir)
(process-file (process-file
"git" nil "git" nil
(current-buffer) (current-buffer)
@ -138,11 +138,11 @@
"git" nil "git" nil
(current-buffer) (current-buffer)
t "show" "-s" "--format='\%ci'" "HEAD")) t "show" "-s" "--format='\%ci'" "HEAD"))
(message (print
(format-time-string (format-time-string
"%Y%m%d" "%Y%m%d"
(date-to-time (date-to-time
(message (progn (print (progn
(re-search-backward (re-search-backward
"\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\)") "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\)")
(match-string-no-properties 1)))))))) (match-string-no-properties 1))))))))
@ -208,8 +208,8 @@
(if files (if files
(setq files (mapcar (lambda (fn) (concat dir "/" fn)) files)) (setq files (mapcar (lambda (fn) (concat dir "/" fn)) files))
(setq files (list dir))) (setq files (list dir)))
(message (prin1-to-string files)) (print files)
(message default-directory) (print default-directory)
(apply 'process-file (apply 'process-file
"tar" nil "tar" nil
(get-buffer-create "*package-build-checkout*") (get-buffer-create "*package-build-checkout*")
@ -248,13 +248,13 @@
(version (version
(cond (cond
((eq repo-type 'svn) ((eq repo-type 'svn)
(message "Subversion") (print 'Subversion)
(package-build-checkout-svn repo-url pkg-cwd)) (package-build-checkout-svn repo-url pkg-cwd))
((eq repo-type 'git) ((eq repo-type 'git)
(message "Git") (print 'Git)
(package-build-checkout-git repo-url pkg-cwd)) (package-build-checkout-git repo-url pkg-cwd))
((eq repo-type 'darcs) ((eq repo-type 'darcs)
(message "Darcs") (print 'Darcs)
(package-build-checkout-darcs repo-url pkg-cwd)))) (package-build-checkout-darcs repo-url pkg-cwd))))
(pkg-base-dir (concat file-name "-" version)) (pkg-base-dir (concat file-name "-" version))
(pkg-file (concat file-name "-pkg.el")) (pkg-file (concat file-name "-pkg.el"))