XAQAVDIHSG5IKC6M3OV4LBYRE76GWYEUDNL4X7QPTYMNAXZ6KD7QC
(defun vc-pijul-find-revision (file rev buffer)
"Fetch REVISION for FILE and put into BUFFER.
I don't know how to do this without creating a new channel. But
it is weird to create a new channel just to do this thing."
(user-error "unimplemented!"))
(defun vc-pijul-checkout (file &optional rev)
"Check out REVISION for FILE.
I don't know how to do this without creating a new channel. But
it is weird to create a new channel just to do this thing."
(user-error "unimplemented!"))
(defun vc-pijul-revert (file &optional contents-done)
"Revert FILE to the working revision.
If CONTENTS-DONE is non-nil, we only need to remove the FILE, if
it is already added but not commited yet."
;; TODO
)
(defvar log-view-message-re)
(defvar log-view-file-re)
(defvar log-view-font-lock-keywords)
(defvar log-view-per-file-logs)
(defvar log-view-expanded-log-entry-function)
(defvar pijul-log-view-format
(list
(rx-to-string
'(seq bol "Change"
(one-or-more space)
(group-n 1
(one-or-more
(any
(?a . ?z)
(?A . ?Z)
digit)))
(any ?\n ?\r))
t)
(list 1 ''log-view-message))
"The format for `vc-pijul-log-view-mode'.
The first element is the regular expression to match the first
line of a log. Its first capture group is required to match
exactly the revision number.
The following elements are font lock keywords.")
(define-derived-mode vc-pijul-log-view-mode log-view-mode
"Pijul-Log-View"
"Major mode for viewing logs of pijul."
;; We need some faces from add-log.
(require 'add-log)
;; There are no file markers, so this should match nothing.
(setq-local log-view-file-re regexp-unmatchable)
(setq-local log-view-per-file-logs nil)
(setq-local log-view-message-re (car pijul-log-view-format))
(setq-local log-view-font-lock-keywords
(cons
pijul-log-view-format
(list
(list
;; only email
(rx-to-string
'(seq bol "Author:"
(one-or-more space)
(group-n 1
(one-or-more
(any
(?a . ?z) (?A . ?Z)
(?0 . ?9) ?_ ?. ?+ ?-))
?@
(one-or-more
(any
(?a . ?z) (?A . ?Z)
(?0 . ?9) ?_ ?. ?-))))
t)
(list 1 ''change-log-email))
(list
;; only name
(rx-to-string
'(seq bol "Author:"
(one-or-more space)
(group-n 1 (one-or-more (not (or ?< ?\n ?\r))))
(zero-or-more space))
t)
(list 1 ''change-log-name))
(list
;; name and email
(rx-to-string
'(seq bol "Author:"
(one-or-more space)
(group-n 1 (+? (not ?<)))
(zero-or-more space)
?<
(group-n 2
(one-or-more
(any
(?a . ?z) (?A . ?Z)
(?0 . ?9) ?_ ?+ ?- ?.))
?@
(one-or-more
(any
(?a . ?z) (?A . ?Z)
(?0 . ?9) ?_ ?- ?.)))
?>)
t)
(list 1 ''change-log-name)
(list 2 ''change-log-email))
(list
;; Date
(rx-to-string
'(seq bol "Date:"
(one-or-more space)
(group-n 1 (one-or-more not-newline)))
t)
(list 1 ''change-log-date))))))