Use SHA1 hashes to encode file names in the timestamp directory.

This will cause all files to be publish again, once, to update
to the new structure.
This commit is contained in:
Carsten Dominik 2008-07-07 14:35:54 -07:00
parent 8c0dec35cf
commit 869aa0d628
3 changed files with 16 additions and 4 deletions

View File

@ -16,6 +16,15 @@
:END:
** Overview
** Incompatible changes
*** New structure for the timestamp directory for org-publish.
The timestamp directory now uses SHA1 hashed versions of the
path to each publishing file. This should be a consistent
and system-independent way to handle things. The change
means that your next publishing command will publish each and
every file again, but just once, until the timestamps are
updated.
** Details
*** New parameters :prefix and :prefix1 for include files

View File

@ -1,3 +1,8 @@
2008-07-07 Carsten Dominik <dominik@science.uva.nl>
* org-publish.el (org-publish-timestamp-filename): Use
SHA1-encoded file names in the timestamp directory.
2008-07-05 Carsten Dominik <dominik@science.uva.nl>
* org-publish.el (org-publish-needed-p): Be verbose about files

View File

@ -297,10 +297,8 @@ If functions in this hook modify the buffer, it will be saved."
(defun org-publish-timestamp-filename (filename)
"Return path to timestamp file for filename FILENAME."
(while (string-match
(if (eq system-type 'windows-nt) "~\\|/\\|:" "~\\|/") filename)
(setq filename (replace-match "_" nil t filename)))
(concat org-publish-timestamp-directory filename ".timestamp"))
(concat (file-name-as-direcory org-publish-timestamp-directory)
"X" (if (fboundp 'sha1) (sha1 filename) (md5 filename))))
(defun org-publish-needed-p (filename)
"Return `t' if FILENAME should be published."