[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vc-jj 413ecc82c5 52/58: add vc-jj-pull
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vc-jj 413ecc82c5 52/58: add vc-jj-pull |
Date: |
Sat, 15 Mar 2025 07:01:58 -0400 (EDT) |
branch: externals/vc-jj
commit 413ecc82c55ea0fd6ca009428f8923e6d15ce8a1
Author: Rudi Schlatte <rudi@constantly.at>
Commit: Rudi Schlatte <rudi@constantly.at>
add vc-jj-pull
---
vc-jj.el | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/vc-jj.el b/vc-jj.el
index 2968aa45fc..f9b0a2c372 100644
--- a/vc-jj.el
+++ b/vc-jj.el
@@ -433,6 +433,39 @@ four groups: change id, author, datetime, line number.")
`(metadata . ((display-sort-function . ,#'identity)))
(complete-with-action action revisions string pred)))))
+(defvar vc-jj-pull-history (list "jj git fetch")
+ "History variable for `vc-jj-pull'.")
+
+(defun vc-jj-pull (prompt)
+ "Pull changes from an upstream repository.
+Normally, this runs \"jj git fetch\". If PROMPT is non-nil, prompt for
+the jj command to run."
+ (let* ((command (if prompt
+ (split-string
+ (read-shell-command
+ (format "jj git fetch command: ")
+ "jj git fetch"
+ 'vc-jj-pull-history)
+ " " t)
+ `(,vc-jj-program "git" "fetch")))
+ (jj-program (car command))
+ (args (cdr command))
+ (root (vc-jj-root default-directory))
+ (buffer (format "*vc-jj : %s*" (expand-file-name root))))
+ (apply #'vc-do-async-command buffer root jj-program args)
+ (with-current-buffer buffer
+ (vc-run-delayed
+ (vc-compilation-mode 'jj)
+ (setq-local compile-command (string-join command " "))
+ (setq-local compilation-directory root)
+ ;; Either set `compilation-buffer-name-function' locally to nil
+ ;; or use `compilation-arguments' to set `name-function'.
+ ;; See `compilation-buffer-name'.
+ (setq-local compilation-arguments
+ (list compile-command nil
+ (lambda (_name-of-mode) buffer)
+ nil))))
+ (vc-set-async-update buffer)))
(provide 'vc-jj)
;;; vc-jj.el ends here
- [elpa] externals/vc-jj b75160031a 29/58: Add some tests, (continued)
- [elpa] externals/vc-jj b75160031a 29/58: Add some tests, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 5294ae8ddd 34/58: Use 'vc-jj-program' instead of hardcoded "jj", ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 31ab84e6bf 32/58: Implement vc-annotate, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 885ddb24ae 38/58: Consider project-files-relative-names in project-files, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 9df26ebf32 40/58: Return full change id from vc-jj-working-revision, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj e505ad90ee 44/58: Use when-let*, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj db1427ba24 42/58: Simplify, add tests for vc-ignore, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 0f0efbfe80 47/58: Improve performance of vc-jj-state, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 95db88c07c 49/58: Improve performance of vc-jj-dir-status-files, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 785b82d5f5 50/58: Simplify `vc-jj-state', fix failing test, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 413ecc82c5 52/58: add vc-jj-pull,
ELPA Syncer <=
- [elpa] externals/vc-jj 23db0c6751 54/58: Use vc-jj-program in vc-push, vc-pull defaults, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 71a84c08fe 58/58: Add cl-lib dependency, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 616c2aea6f 15/58: Merge #1 and #2: Fix and improve vc-dir, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 290cd89ad8 57/58: Try to make vc-dir more performant, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 56bacbe747 55/58: Remove vc-jj--call-jj, use vc-switches, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 24161b5249 19/58: Differentiate between added and modified files in `vc-jj-state`, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 117c75b740 20/58: Better mode-line indicator, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 5df3902990 33/58: Add .gitignore, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 1ec756866d 39/58: Fix byte-compilation warnings, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj ead089c231 43/58: Use "jj file track" in vc-jj-register, ELPA Syncer, 2025/03/15