Only consider timestamps for files in packages for Subversion recipes.

This commit is contained in:
Donald Curtis 2012-04-17 15:28:30 -05:00
parent 565ee2017b
commit 2dc9a2bd47

View file

@ -179,9 +179,10 @@ seconds; the server cuts off after 10 requests in 20 seconds.")
(defun pb/checkout-svn (name config dir) (defun pb/checkout-svn (name config dir)
"Check package NAME with config CONFIG out of svn into DIR." "Check package NAME with config CONFIG out of svn into DIR."
(let ((repo (plist-get config :url))) (with-current-buffer (get-buffer-create "*package-build-checkout*")
(with-current-buffer (get-buffer-create "*package-build-checkout*") (let ((repo (plist-get config :url))
(goto-char (point-max)) (bound (goto-char (point-max)))
timestamps ts)
(cond (cond
((and (file-exists-p (expand-file-name ".svn" dir)) ((and (file-exists-p (expand-file-name ".svn" dir))
(string-equal (pb/svn-repo dir) repo)) (string-equal (pb/svn-repo dir) repo))
@ -192,9 +193,17 @@ seconds; the server cuts off after 10 requests in 20 seconds.")
(delete-directory dir t nil)) (delete-directory dir t nil))
(print "cloning repository") (print "cloning repository")
(pb/run-process nil "svn" "checkout" repo dir))) (pb/run-process nil "svn" "checkout" repo dir)))
(pb/run-process dir "svn" "info") (let ((files (pb/expand-file-list pkg-cwd
(pb/find-parse-time (or (plist-get cfg :files)
"\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\)")))) (list "*.el")))))
(apply 'pb/run-process dir "svn" "info" files))
(while (setq ts (ignore-errors
(pb/find-parse-time
"Last Changed Date: \\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\)" bound)))
(add-to-list 'timestamps ts))
(unless timestamps
(error "No valid timestamps found!"))
(car (reverse (sort timestamps 'string<))))))
(defun pb/git-repo (dir) (defun pb/git-repo (dir)
"Get the current git repo for DIR." "Get the current git repo for DIR."