Function: vc-jj-next-revision

vc-jj-next-revision is a natively compiled function defined in vc-jj.el.

Signature

(vc-jj-next-revision FILE REV)

Documentation

JJ-specific version of vc-next-revision.

Return the revision that follows 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
;;;; file-name-changes

;;;; next-revision

(defun vc-jj-next-revision (file rev)
  "JJ-specific version of `vc-next-revision'.
Return the revision that follows REV for FILE, or nil if no such
revision exists."
  (if file
      (vc-jj--command-parseable "log" "--no-graph" "--limit" "1"
                                "-r" (concat "descendants(" rev ")")
                                 "-T" "change_id"
                                 "--" (vc-jj--filename-to-fileset file))
    ;; Note: experimentally, jj (as of 0.35.0) prints children in LIFO
    ;; order (newest child first), but we should not rely on that
    ;; behavior and since none of the children of a change are
    ;; special, we return an arbitrary one.
    (car (vc-jj--process-lines "log" "--no-graph"
                                 "-r" (concat "children(" rev ")")
                                 "-T" "change_id ++ \"\n\""))))