diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-22 13:24:16 -0800 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-22 13:31:01 -0800 |
| commit | eba66c1eafeef6512259c9b46face2b03c7433b8 (patch) | |
| tree | 0945a1e684448ba37146dbd36cd71dc91d70dad2 /lisp/vc | |
| parent | 0613e7a38efc3b0534e0ca5c5fa401e2a3bda906 (diff) | |
| download | emacs-eba66c1eafeef6512259c9b46face2b03c7433b8.tar.gz | |
Remove some timestamp format assumptions
Don’t assume that current-time and plain encode-time return
timestamps in (HI LO US PS) format.
* lisp/gnus/gnus-art.el (article-make-date-line)
(article-lapsed-string):
* lisp/gnus/gnus-demon.el (gnus-demon-time-to-step):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
* lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles):
* lisp/net/pop3.el (pop3-uidl-dele):
* lisp/org/ox-publish.el (org-publish-sitemap):
* lisp/vc/vc-hg.el (vc-hg-state-fast):
Simplify and remove assumptions about timestamp format.
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
Do not worry about time-subtract returning nil; that's not possible.
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
Avoid race due to duplicate current-time calls.
* lisp/vc/vc-hg.el (vc-hg--time-to-integer): Remove; no longer used.
Diffstat (limited to 'lisp/vc')
| -rw-r--r-- | lisp/vc/vc-hg.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 342c6d214cd..6b17e861dda 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -923,9 +923,6 @@ FILENAME must be the file's true absolute name." (setf ignored (string-match (pop patterns) filename))) ignored)) -(defun vc-hg--time-to-integer (ts) - (+ (* 65536 (car ts)) (cadr ts))) - (defvar vc-hg--cached-ignore-patterns nil "Cached pre-parsed hg ignore patterns.") @@ -1046,8 +1043,9 @@ hg binary." (let ((vc-hg-size (nth 2 dirstate-entry)) (vc-hg-mtime (nth 3 dirstate-entry)) (fs-size (file-attribute-size stat)) - (fs-mtime (vc-hg--time-to-integer - (file-attribute-modification-time stat)))) + (fs-mtime (encode-time + (file-attribute-modification-time stat) + 'integer))) (if (and (eql vc-hg-size fs-size) (eql vc-hg-mtime fs-mtime)) 'up-to-date 'edited))) |
