Function: vc-jj-previous-revision
vc-jj-previous-revision is a natively compiled function defined in
vc-jj.el.
Signature
(vc-jj-previous-revision FILE REV)
Documentation
JJ-specific version of vc-previous-revision.
Return the revision number that precedes REV for FILE, or nil if no such revision exists.
Source Code
;; Defined in /nix/store/j1ql1qsv99iszr5pqf5fk9yfcl5pq4nv-emacs-packages-deps/share/emacs/site-lisp/elpa/vc-jj-0.5/vc-jj.el
;;;; ignore-completion-table
;;;; find-ignore-file
;;;; previous-revision
(defun vc-jj-previous-revision (file rev)
"JJ-specific version of `vc-previous-revision'.
Return the revision number that precedes REV for FILE, or nil if no such
revision exists."
(if file
(vc-jj--command-parseable "log" "--no-graph" "--limit" "1"
"-r" (format "ancestors(%s) & ~%s" rev rev)
"-T" "change_id"
"--" (vc-jj--filename-to-fileset file))
;; The jj manual states that "for merges, [first_parent] only
;; returns the first parent instead of returning all parents";
;; given the choice, we do want to return the first parent of a
;; merge change.
(vc-jj--command-parseable "log" "--no-graph"
"-r" (concat "first_parent(" rev ")")
"-T" "change_id")))