Function: majutsu-interactive-run-replay-plan

majutsu-interactive-run-replay-plan is a natively compiled function defined in majutsu-interactive.el.

Signature

(majutsu-interactive-run-replay-plan COMMAND ARGS FILESETS PLAN)

Documentation

Run jj COMMAND with ARGS and FILESETS using replay PLAN.

PLAN reconstructs the merge editor's right tree from its selected or complemented text and whole-file changes.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-interactive.el
(defun majutsu-interactive-run-replay-plan (command args filesets plan)
  "Run jj COMMAND with ARGS and FILESETS using replay PLAN.
PLAN reconstructs the merge editor's right tree from its selected or
complemented text and whole-file changes."
  (let ((directory (majutsu-interactive--make-operation-temp-dir))
        retained)
    (unwind-protect
        (let* ((patch-file (majutsu-interactive--write-patch
                            (or (plist-get plan :patch) "") directory))
               (tool-config (majutsu-interactive--build-tool-config
                             patch-file plan directory))
               (args (append args
                             (list "-i" "--tool" "majutsu-applypatch")
                             tool-config))
               (full-args
                (cons command (majutsu-jj-append-filesets args filesets)))
               (process (majutsu-run-jj-with-editor full-args)))
          (setq retained
                (majutsu-interactive--retain-temp-dir-for-process
                 process directory))
          process)
      (unless retained
        (majutsu-interactive--delete-operation-temp-dir directory)))))