branch: externals/vc-jj
commit 13b00216330c381179659f5210472fe975c2805d
Author: Rudi Schlatte <[email protected]>
Commit: Rudi Schlatte <[email protected]>
Release v0.5
---
NEWS.org | 18 +++++++-----------
vc-jj-tests.el | 4 ++--
vc-jj.el | 46 +++++++++++++++++++++++-----------------------
3 files changed, 32 insertions(+), 36 deletions(-)
diff --git a/NEWS.org b/NEWS.org
index 3930f44533..1e7745bbf1 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -2,16 +2,14 @@
* Recent changes
-** Unreleased
+** [[https://codeberg.org/emacs-jj-vc/vc-jj.el/compare/v0.4...v0.5][0.5]] -
2025-12-21
*** Added
-- Added support for ~vc-region-history~. Note that this requires the
- repository to be co-located since we call ~vc-git-region-history~, but
- repositories are co-located by default since jujutsu 0.34.
+- Added support for ~vc-region-history~. Note that this requires the
repository to be co-located since we call ~vc-git-region-history~, but
repositories are co-located by default since jujutsu 0.34.
- Added ~vc-jj-clone~, making it possible to run ~vc-clone~.
-- Define a new face: ~vc-jj-log-view-commit~. This is the face used for commit
IDs in JJ Log View buffers.
-- Define a new face: ~vc-jj-log-view-bookmark~. This is the face used for
bookmark names in JJ Log View buffers.
+- Define a new face: ~vc-jj-log-view-commit~. This is the face used for
commit IDs in JJ Log View buffers.
+- Define a new face: ~vc-jj-log-view-bookmark~. This is the face used for
bookmark names in JJ Log View buffers.
- In the JJ Log View buffer:
- Fontify conflict indicators (~vc-conflict-state~)
- Fontify commit IDs (~vc-jj-log-view-commit~)
@@ -22,16 +20,14 @@
*** Changed
- Commands specific to vc-jj in the JJ Log View buffer have been renamed to
have a "vc-jj-log-view-" prefix.
-- Only abandon revision with ~vc-jj-log-view-abandon-change~ once the user
confirms their decision.
+- Only abandon a change with ~vc-jj-log-view-abandon-change~ once the user
confirms their decision.
- Bookmark operations in the JJ Log View buffer (e.g.,
~vc-jj-log-view-bookmark-delete~, ~vc-jj-log-view-abandon-change~) no longer
prompt to confirm reverting the parent buffer (~vc-parent-buffer~) when
~auto-revert-mode~ is already enabled in that buffer.
- In Emacs 30.1 and newer, reverting a JJ Log View buffer will, when possible,
keep point on the same revision as before the revert. To undo this, add a
function to ~vc-jj-log-view-mode-hook~ that removes
~vc-jj-log-view-restore-position~ from the local value of
~revert-buffer-restore-functions~.
-
-*** Removed
*** Fixed
-- Fixed ~vc-jj-diff~ not transforming filenames into jj fileset syntax. This
means commands like ~vc-diff~ and ~log-view-diff~ do not fail.
-- Fixed a bug related to vc-jj's integration with project.el in cases where a
.git repo is within a subdirectory of a .jj repo. Previously, when inside the
.git repo, project.el would erroneously detect the .jj repo to be current one
(instead of the .git repo, which is closer). Now, project.el correctly detects
the closer .git repo.
+- Fixed ~vc-jj-diff~ not transforming filenames into jj fileset syntax. This
fixes commands like ~vc-diff~ and ~log-view-diff~ among others.
+- Fixed a bug related to vc-jj's integration with project.el in cases where a
git repo is located within a subdirectory of a jj repo. Previously, when
inside the git repo, project.el would erroneously detect the jj repo to be
current one (instead of the git repo, which is closer). Now, project.el
correctly detects the closer git repo.
- ~vc-jj-bookmark-delete~ now properly recognizes the names of local bookmarks
that are pushable to a remote.
- Prevent the possibility of operating on the wrong revisions when in stale JJ
Log View buffers (Log View buffers that are not up-to-date with the repository).
- Show the correct diff in log-edit buffers created by
~log-view-modify-change-comment~.
diff --git a/vc-jj-tests.el b/vc-jj-tests.el
index 1eddb1561c..51918cff4f 100644
--- a/vc-jj-tests.el
+++ b/vc-jj-tests.el
@@ -377,7 +377,7 @@ REV2 arguments) and (2) when only REV1 has been specified
to it."
;; Helpful for debugging
(message (shell-command-to-string "jj log -p"))
-
+
;; No revisions and no file (show entire diff)
(with-temp-buffer
(vc-jj-diff nil nil nil (current-buffer))
@@ -412,7 +412,7 @@ REV2 arguments) and (2) when only REV1 has been specified
to it."
"@@ -0,0 +1,1 @@"
"+bar\n")
"\n"))))
-
+
;; No revisions and specify a file present only in the second,
;; older parent (show diff only for that file)
(with-temp-buffer
diff --git a/vc-jj.el b/vc-jj.el
index 4dad995230..452a3f65bf 100644
--- a/vc-jj.el
+++ b/vc-jj.el
@@ -6,7 +6,7 @@
;; Rudolf Schlatte <[email protected]>
;; Kristoffer Balintona <[email protected]>
;; URL: https://codeberg.org/emacs-jj-vc/vc-jj.el
-;; Version: 0.4
+;; Version: 0.5
;; Package-Requires: ((emacs "28.1") (compat "29.4"))
;; Keywords: vc tools
@@ -44,7 +44,7 @@
;; vc-git due to jj’s model.
;; FILE STRUCTURE
-;;
+;;
;; After the "Customization" and "Internal Utilities" sections, the
;; organization of this file follows the "BACKEND PROPERTIES" section
;; of the preamble of the 'vc.el' file: each outline heading
@@ -182,25 +182,25 @@ various regions of the Log View buffer."
"String or list of strings specifying switches for \"jj file annotate\".
If nil, use the value of `vc-annotate-switches'. If t, use no switches."
:type '(choice (const :tag "Unspecified" nil)
- (const :tag "None" t)
- (string :tag "Argument String")
- (repeat :tag "Argument List" :value ("") string)))
+ (const :tag "None" t)
+ (string :tag "Argument String")
+ (repeat :tag "Argument List" :value ("") string)))
(defcustom vc-jj-checkin-switches nil
"String or list of strings specifying switches for \"jj commit\".
If nil, use the value of `vc-checkin-switches'. If t, use no switches."
:type '(choice (const :tag "Unspecified" nil)
- (const :tag "None" t)
- (string :tag "Argument String")
- (repeat :tag "Argument List" :value ("") string)))
+ (const :tag "None" t)
+ (string :tag "Argument String")
+ (repeat :tag "Argument List" :value ("") string)))
(defcustom vc-jj-diff-switches '("--git")
"String or list of strings specifying switches for \"jj diff\".
If nil, use the value of `vc-diff-switches'. If t, use no switches."
:type '(choice (const :tag "Unspecified" nil)
- (const :tag "None" t)
- (string :tag "Argument String")
- (repeat :tag "Argument List" :value ("") string)))
+ (const :tag "None" t)
+ (string :tag "Argument String")
+ (repeat :tag "Argument List" :value ("") string)))
(defface vc-jj-log-view-commit
'((t :weight light :inherit (shadow italic)))
@@ -255,16 +255,16 @@ warnings to stderr even when run with '--quiet'."
(list (current-buffer) nil)
nil args)))
(unless (eq status 0)
- (error "'jj' exited with status %s" status))
+ (error "'jj' exited with status %s" status))
(goto-char (point-min))
(let (lines)
- (while (not (eobp))
- (setq lines (cons (buffer-substring-no-properties
- (line-beginning-position)
- (line-end-position))
- lines))
- (forward-line 1))
- (nreverse lines)))))
+ (while (not (eobp))
+ (setq lines (cons (buffer-substring-no-properties
+ (line-beginning-position)
+ (line-end-position))
+ lines))
+ (forward-line 1))
+ (nreverse lines)))))
(defun vc-jj--command-parseable (&rest args)
"Run jj with ARGS, returning its output as string.
@@ -281,7 +281,7 @@ process status."
(list (current-buffer) nil)
nil args)))
(unless (eq status 0)
- (error "'jj' exited with status %s" status))
+ (error "'jj' exited with status %s" status))
(buffer-substring-no-properties (point-min) (point-max)))))
(defun vc-jj--command-dispatched (buffer okstatus file-or-list &rest flags)
@@ -658,7 +658,7 @@ If PROMPT is non-nil, prompt for the jj command to run
(default is \"jj
git fetch\")."
(let* ((command (if prompt
(split-string-shell-command
- (read-shell-command
+ (read-shell-command
(format "jj git fetch command: ")
(concat vc-jj-program " git fetch")
'vc-jj-pull-history))
@@ -681,7 +681,7 @@ If PROMPT is non-nil, prompt for the command to run
(default is \"jj git
push\")."
(let* ((command (if prompt
(split-string-shell-command
- (read-shell-command
+ (read-shell-command
(format "jj git push command: ")
(concat vc-jj-program " git push")
'vc-jj-push-history))
@@ -1009,7 +1009,7 @@ delete."
(1 'change-log-name)
(2 'change-log-email)
(3 'change-log-date)))))
-
+
(when (boundp 'revert-buffer-restore-functions) ; Emacs 30.1
(add-hook 'revert-buffer-restore-functions
#'vc-jj-log-view-restore-position nil t)))