emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ELPA-diffs] UNNAMED PROJECT branch, master, updated. b72e08e1b156722f31


From: Stefan Monnier
Subject: [ELPA-diffs] UNNAMED PROJECT branch, master, updated. b72e08e1b156722f3149255394d7b8a9f04da685
Date: Sat, 10 Aug 2013 13:56:40 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".

The branch, master has been updated
       via  b72e08e1b156722f3149255394d7b8a9f04da685 (commit)
       via  fe154a977d7f9c0987233b5429a846e61d1d6f82 (commit)
      from  232a509cd50fdcdc616748dd827dbe3e2cc6e72c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b72e08e1b156722f3149255394d7b8a9f04da685
Author: Stefan Monnier <address@hidden>
Date:   Sat Aug 10 09:56:31 2013 -0400

    Get "make -k" to go through

diff --git a/.bzrignore b/.bzrignore
index 9c9e22e..74d9174 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -1,8 +1,11 @@
 *.elc
+*~
+ChangeLog
 archive
-site
+core
+externals-list
 packages/*/*-autoloads.el
 packages/*/*-pkg.el
-core
-ChangeLog
 packages/.changelog-witness
+packages/dismal
+site
diff --git a/GNUmakefile b/GNUmakefile
index 7f2061d..3199fcc 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -9,34 +9,16 @@ SITE_DIR=site
 
 all: all-in-place
 
-## Set up the source files for direct usage, by pointing
-## `package-directory-list' to the site/ directory.
-site: packages
-       mkdir -p $(SITE_DIR)
-       $(EMACS) -batch -l $(CURDIR)/admin/archive-contents.el \
-         --eval "(batch-make-site-dir \"packages\" \"$(SITE_DIR)\")"
-
-site/%: do-it
-       $(EMACS) -batch -l $(CURDIR)/admin/archive-contents.el \
-         --eval "(progn (setq debug-on-error t) (batch-make-site-package 
\"address@hidden"))"
-
 ## Deploy the package archive to archive/, with packages in
 ## archive/packages/:
 archive: archive-tmp
        $(MAKE) $(MFLAGS) process-archive
 
-archive-tmp: packages changelogs
+archive-tmp: packages
        -rm -r $(ARCHIVE_TMP)
        mkdir -p $(ARCHIVE_TMP)
        cp -a packages/. $(ARCHIVE_TMP)/packages
 
-# Refresh the ChangeLog files.  This needs to be done in
-# the source tree, because it needs the Bzr data!
-changelogs:
-       cd packages; \
-       $(EMACS) -batch -l $(CURDIR)/admin/archive-contents.el \
-                       -f batch-prepare-packages
-
 process-archive:
        # FIXME, we could probably speed this up significantly with
        # rules like "%.tar: ../%/ChangeLog" so we only rebuild the packages
@@ -75,7 +57,7 @@ org-fetch: archive-tmp
 clean:
        rm -rf archive $(ARCHIVE_TMP) $(SITE_DIR)
 
-########## Rules for in-place installation ##########
+########## Rules for in-place installation ####################################
 pkgs := $(foreach pkg, $(wildcard packages/*), \
           $(if $(shell [ -d "$(pkg)" ] && echo true), $(pkg)))
 
@@ -152,3 +134,7 @@ $(extra_elcs):; rm $@
 all-in-place: $(extra_elcs) $(autoloads) # $(single_pkgs)
        # Do them in a sub-make, so that autoloads are done first.
        $(MAKE) elcs
+
+
+############### Rules to prepare the externals ################################
+
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index 56daa8e..5a5462a 100644
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -1,4 +1,4 @@
-;;; archive-contents.el --- Auto-generate an Emacs Lisp package archive.
+;;; archive-contents.el --- Auto-generate an Emacs Lisp package archive.  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2011, 2012, 2013  Free Software Foundation, Inc
 
@@ -24,6 +24,7 @@
 (eval-when-compile (require 'cl))
 (require 'lisp-mnt)
 (require 'package)
+(require 'pcase)
 
 (defconst archive-contents-subdirectory-regexp
   
"\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)")
@@ -86,7 +87,7 @@ Delete backup files also."
       (write-region nil nil "archive-contents"))))
 
 (defun batch-prepare-packages ()
-  "Prepare the `packages' directory inside the Bzr checkout.
+  "Prepare the `packages' directory inside the Git checkout.
 Expects to be called from within the `packages' directory.
 \"Prepare\" here is for subsequent construction of the packages and archive,
 so it is meant to refresh any generated files we may need.
@@ -218,6 +219,7 @@ package commentary to PKG-readme.txt.  Return the 
descriptor."
         (if (file-readable-p "ChangeLog") (insert-file-contents "ChangeLog"))
         (let ((old-md5 (md5 (current-buffer))))
           (erase-buffer)
+          ;; git --no-pager log --date=short --format="%cd  %aN  
<%ae>%n%n%w(80,8,8)%B%n" | sed 's/^        /\t/'
           (call-process "bzr" nil (current-buffer) nil
                         "log" "--gnu-changelog" ".")
           (if (equal old-md5 (md5 (current-buffer)))
@@ -355,40 +357,95 @@ PKG-readme.txt.  Return the descriptor."
      ((>= bytes 10) (format "%4.1f%s" bytes (car units)))
      (t (format "%4.2f%s" bytes (car units))))))
 
+(defun archive--get-prop (prop name srcdir mainsrcfile)
+  (let ((kprop (intern (format ":%s" (downcase prop)))))
+    (or
+     (let ((pkgdescfile (expand-file-name (format "%s-pkg.el" name)
+                                          srcdir)))
+       (when (file-readable-p pkgdescfile)
+         (with-temp-buffer
+           (insert-file-contents pkgdescfile)
+           (let ((desc (read (current-buffer))))
+             (plist-get (cdr desc) kprop)))))
+     (when (file-readable-p mainsrcfile)
+       (with-temp-buffer
+         (insert-file-contents mainsrcfile)
+         (lm-header prop))))))
+
+(defun archive--get-section (hsection fsection srcdir mainsrcfile)
+  (cond
+   ((file-readable-p (expand-file-name fsection srcdir))
+    (with-temp-buffer
+      (insert-file-contents (expand-file-name fsection srcdir))
+      (buffer-string)))
+   ((file-readable-p mainsrcfile)
+    (with-temp-buffer
+      (insert-file-contents mainsrcfile)
+      (let ((start (lm-section-start hsection)))
+        (when start
+          (insert
+           (prog1
+               (buffer-substring start (lm-section-end hsection))
+             (erase-buffer)))
+          (emacs-lisp-mode)
+          (goto-char (point-min))
+          (delete-region (point) (line-beginning-position 2))
+          (uncomment-region (point-min) (point-max))
+          (when (looking-at "^\\([ \t]*\n\\)+")
+            (replace-match ""))
+          (goto-char (point-max))
+          (skip-chars-backward " \t\n")
+          (delete-region (point) (point-max))
+          (buffer-string)))))))
+
+(defun archive--quote (txt)
+  (replace-regexp-in-string "<" "&lt"
+                            (replace-regexp-in-string "&" "&amp" txt)))
+
 (defun archive--html-make-pkg (pkg files)
-  (let ((name (symbol-name (car pkg)))
-        (latest (package-version-join (aref (cdr pkg) 0)))
-        (desc (aref (cdr pkg) 2)))
-    ;; FIXME: Add maintainer info.
+  (let* ((name (symbol-name (car pkg)))
+         (latest (package-version-join (aref (cdr pkg) 0)))
+         (srcdir (expand-file-name name "../../build/packages"))
+         (mainsrcfile (expand-file-name (format "%s.el" name) srcdir))
+         (desc (aref (cdr pkg) 2)))
     (with-temp-buffer
       (insert (archive--html-header (format "GNU ELPA - %s" name)))
-      (insert (format "<p>Description: %s</p>\n" desc))
+      (insert (format "<p>Description: %s</p>\n" (archive--quote desc)))
       (let* ((file (cdr (assoc latest files)))
              (attrs (file-attributes file)))
         (insert (format "<p>Latest: <a href=%S>%s</a>, %s, %s</p>\n"
-                        file file
+                        file (archive--quote file)
                         (format-time-string "%Y-%b-%d" (nth 5 attrs))
                         (archive--html-bytes-format (nth 7 attrs)))))
-      ;; FIXME: This URL is wrong for Org.
-      (let ((repurl (concat 
"http://bzr.sv.gnu.org/lh/emacs/elpa/files/head:/packages/"; name)))
-        (insert (format "<p>Repository: <a href=%S>%s</a></p>" repurl repurl)))
-      (let ((readme (concat name "-readme.txt"))
-            (end (copy-marker (point) t)))
-        (when (file-readable-p readme)
-          (insert "<p>Full description:<pre>\n")
-          (insert-file-contents readme)
-          (goto-char end)
-          (insert "\n</pre></p>")))
+      (let ((maint (archive--get-prop "Maintainer" name srcdir mainsrcfile)))
+        (when maint
+          (insert (format "<p>Maintainer: %s</p>\n" (archive--quote maint)))))
+      (let* ((urlkind "Origin")
+             (url
+              (or (archive--get-prop "URL" name srcdir mainsrcfile)
+                  (progn
+                    (setq urlkind "Repository")
+                    (concat 
"http://bzr.sv.gnu.org/lh/emacs/elpa/files/head:/packages/"; name)))))
+        (insert (format "<p>%s: <a href=%S>%s</a></p>"
+                        urlkind url (archive--quote url))))
+      (let ((readme (archive--get-section "Commentary" "README" srcdir 
mainsrcfile)))
+        (when readme
+          (insert "<h2>Full description</h2><pre>\n" (archive--quote readme)
+                  "\n</pre>\n")))
       (unless (< (length files) 2)
-        (insert (format "<p>Old versions:<table cellpadding=\"3\" 
border=\"1\">\n"))
+        (insert (format "<h2>Old versions</h2><table cellpadding=\"3\" 
border=\"1\">\n"))
         (dolist (file files)
           (unless (equal (pop file) latest)
             (let ((attrs (file-attributes file)))
               (insert (format "<tr><td><a 
href=%S>%s</a></td><td>%s</td><td>%s</td>\n"
-                              file file
+                              file (archive--quote file)
                               (format-time-string "%Y-%b-%d" (nth 5 attrs))
                               (archive--html-bytes-format (nth 7 attrs)))))))
-        (insert "</table></body>\n"))
+        (insert "</table>\n"))
+      (let ((news (archive--get-section "News" "NEWS" srcdir mainsrcfile)))
+        (when news
+          (insert "<h2>News</h2><pre>\n" (archive--quote news) "\n</pre>\n")))
+      (insert "</body>\n")
       (write-region (point-min) (point-max) (concat name ".html")))))
 
 (defun archive--html-make-index (pkgs)
@@ -429,11 +486,55 @@ PKG-readme.txt.  Return the descriptor."
     ;; FIXME: Add (old?) packages that are in `packages' but not in
     ;; archive-contents.
     (archive--html-make-index archive-contents)))
-        
 
-;; Local Variables:
-;; lexical-binding: t
-;; End:
+;;; Maintain external packages.
+
+(defun archive-add/remove-externals ()
+  (let ((exts (with-current-buffer (find-file-noselect "externals-list")
+                (goto-char (point-min))
+                (read (current-buffer)))))
+    (let ((default-directory (expand-file-name "packages/")))
+      ;; Remove "old/odd" externals.
+      (dolist (dir (directory-files "."))
+        (cond
+         ((member dir '("." "..")) nil)
+         ((assoc dir exts) nil)
+         ((file-directory-p (expand-file-name (format "%s/.git" dir)))
+          (let ((status
+                 (with-temp-buffer
+                   (let ((default-directory (file-name-as-directory
+                                             (expand-file-name dir))))
+                     (call-process "git" nil t nil "status" "--porcelain")
+                     (buffer-string)))))
+            (if (zerop (length status))
+                (progn (delete-directory dir 'recursive t)
+                       (message "Deleted all of %s" dir))
+              (message "Keeping leftover unclean %s:\n%s" dir status))))))
+      (pcase-dolist (`(,dir ,kind ,url) exts)
+        (cond
+         ((not (file-exists-p dir))
+          (let* ((branch (concat "externals/" dir))
+                 (output
+                  (with-temp-buffer
+                    ;; FIXME: Use git-new-workdir!
+                    (call-process "git" nil t nil "branch" "--track"
+                                  branch (concat "origin/" branch))
+                    (call-process "git" nil t nil "clone"
+                                  "--shared" "--branch" branch "../" dir)
+                    ;; (let ((default-directory (file-name-as-directory
+                    ;;                           (expand-file-name dir))))
+                    ;;   (call-process "git" nil t nil "branch"
+                    ;;                 "-m" branch "master"))
+                    (buffer-string))))
+            (message "Cloning branch %s:\n%s" dir output)))
+         ((not (file-directory-p (concat dir "/.git")))
+          (message "%s is in the way of an external, please remove!" dir))
+         (t
+          (let ((default-directory (expand-file-name dir)))
+            (with-temp-buffer
+              (call-process "git" nil t nil "pull")
+              (message "Updated %s:%s" dir (buffer-string))))
+          ))))))
 
 (provide 'archive-contents)
 ;;; archive-contents.el ends here
diff --git a/admin/update-archive.sh b/admin/update-archive.sh
index 091d7c0..9a37eda 100755
--- a/admin/update-archive.sh
+++ b/admin/update-archive.sh
@@ -62,9 +62,20 @@ check_copyright () {
 
 cd ~elpa/build
 
-(cd ~elpa/elpa; bzr up)
+(cd ~elpa/elpa;
 
-check_copyright
+ # Fetch changes.
+ git pull || signal_error "git pull failed";
+
+ # Refresh the ChangeLog files.  This needs to be done in
+ # the source tree, because it needs the Bzr data!
+ (cd packages;
+  emacs -batch -l ../admin/archive-contents.el -f batch-prepare-packages);
+
+ emacs --batch -l admin/archive-contents.el -f archive-add/remove-externals;
+
+ check_copyright
+ )
 
 rm -rf archive                  # In case there's one left over!
 make archive-full >make.log 2>&1 || {
diff --git a/packages/auctex/auctex-pkg.el b/packages/auctex/auctex-pkg.el
index 8b4ff49..6b3dca3 100644
--- a/packages/auctex/auctex-pkg.el
+++ b/packages/auctex/auctex-pkg.el
@@ -1 +1 @@
-(define-package "auctex" "11.86.1" "Integrated environment for *TeX*")
+(define-package "auctex" "11.86.1" "Integrated environment for *TeX*" nil :url 
"http://www.gnu.org/software/auctex/";)
diff --git a/packages/auctex/tex.el b/packages/auctex/tex.el
index e11f16b..0ff821c 100644
--- a/packages/auctex/tex.el
+++ b/packages/auctex/tex.el
@@ -1,6 +1,6 @@
 ;;; tex.el --- Support for TeX documents.
 
-;; Copyright (C) 1985-1987, 1991, 1993, 1994, 1996, 1997, 1999-2012
+;; Copyright (C) 1985-1987, 1991, 1993, 1994, 1996, 1997, 1999-2013
 ;;   Free Software Foundation, Inc.
 
 ;; Maintainer: address@hidden
@@ -39,6 +39,11 @@
 (eval-when-compile
   (require 'cl))
 
+(defun TeX--call-3/2 (f arg1 arg2 arg3)
+  (condition-case nil
+      (funcall f arg1 arg2 arg3)
+    (wrong-number-of-arguments (funcall f arg1 arg2))))
+
 (defgroup TeX-file nil
   "Files used by AUCTeX."
   :group 'AUCTeX)
@@ -121,7 +126,8 @@ If nil, none is specified."
   :type '(choice (const :tag "Unspecified" nil)
                 string))
 ;; At least in TeXLive 2009 ConTeXt does not support an omega option anymore.
-(make-obsolete-variable 'ConTeXt-Omega-engine 'TeX-engine-alist)
+(TeX--call-3/2 #'make-obsolete-variable 'ConTeXt-Omega-engine
+               'TeX-engine-alist "before 11.86")
 
 (defcustom TeX-queue-command "lpq -P%p"
   "*Command used to show the status of a printer queue.
@@ -1285,8 +1291,9 @@ TYPE can be one of the following symbols:\n"
   :group 'TeX-command
   (TeX-engine-set (if TeX-Omega-mode 'omega 'default)))
 (defalias 'tex-omega-mode 'TeX-Omega-mode)
-(make-obsolete 'TeX-Omega-mode 'TeX-engine-set)
-(make-obsolete-variable 'TeX-Omega-mode 'TeX-engine)
+(TeX--call-3/2 #'make-obsolete 'TeX-Omega-mode 'TeX-engine-set "before 11.86")
+(TeX--call-3/2 #'make-obsolete-variable 'TeX-Omega-mode
+               'TeX-engine "before 11.86")
 
 ;;; Forward and inverse search
 
@@ -1434,7 +1441,8 @@ SyncTeX are recognized."
          (when TeX-source-correlate-mode
            'TeX-synctex-output-page))))
 (defalias 'TeX-source-specials-mode 'TeX-source-correlate-mode)
-(make-obsolete 'TeX-source-specials-mode 'TeX-source-correlate-mode)
+(TeX--call-3/2 #'make-obsolete 'TeX-source-specials-mode
+               'TeX-source-correlate-mode "before 11.86")
 (defalias 'tex-source-correlate-mode 'TeX-source-correlate-mode)
 (put 'TeX-source-correlate-mode 'safe-local-variable 'TeX-booleanp)
 ;; We do not want the custom variable to require tex.el.  This is only

commit fe154a977d7f9c0987233b5429a846e61d1d6f82
Author: Stefan Monnier <address@hidden>
Date:   Sat Aug 10 09:56:10 2013 -0400

    Get "make -k" to go through

diff --git a/.gitignore b/.gitignore
new file mode 120000
index 0000000..15eedb4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.bzrignore
\ No newline at end of file

-----------------------------------------------------------------------

Summary of changes:
 .bzrignore                    |    9 ++-
 .gitignore                    |    1 +
 GNUmakefile                   |   26 ++------
 admin/archive-contents.el     |  151 ++++++++++++++++++++++++++++++++++-------
 admin/update-archive.sh       |   15 ++++-
 packages/auctex/auctex-pkg.el |    2 +-
 packages/auctex/tex.el        |   18 ++++--
 7 files changed, 166 insertions(+), 56 deletions(-)
 create mode 120000 .gitignore


hooks/post-receive
-- 
UNNAMED PROJECT



reply via email to

[Prev in Thread] Current Thread [Next in Thread]