branch: externals/vc-jj
commit b774f5143b12a9006892cea553a065e5b6726825
Author: Kristoffer Balintona <[email protected]>
Commit: Kristoffer Balintona <[email protected]>
fix: Handle pushable bookmarks correctly in `vc-jj-bookmark-delete'
In Jujutsu, bookmarks marked with an asterisk (`*`) in the log
indicate local bookmarks that track a remote bookmark that points to a
different commit, i.e., bookmarks that can be pushed.
Previously, the names of these bookmarks in `vc-jj-bookmark-delete'
would erroneously include the asterisk, leading to attempts at
deleting bookmarks with incorrect names. Do not include the asterisk
by using the .name() method on each bookmark name.
---
NEWS.org | 1 +
vc-jj.el | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/NEWS.org b/NEWS.org
index 2824fd7935..7553fb538a 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -19,6 +19,7 @@
- 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.
++ ~vc-jj-bookmark-delete~ properly recognize the names of local bookmarks that
are pushable to a remote.
** [[https://codeberg.org/emacs-jj-vc/vc-jj.el/compare/v0.3...v0.4][0.4]] -
2025-09-03
diff --git a/vc-jj.el b/vc-jj.el
index 05bd1f4a24..5ab346cbbb 100644
--- a/vc-jj.el
+++ b/vc-jj.el
@@ -734,9 +734,11 @@ delete."
(when (derived-mode-p 'vc-jj-log-view-mode)
(let* ((rev (log-view-current-tag))
(revision-bookmarks
- (string-split (vc-jj--command-parseable "show" "-r" rev
"--no-patch"
- "-T"
"self.local_bookmarks() ++ \"\n\"")
- " " t "\n"))
+ (string-split
+ (vc-jj--command-parseable
+ "show" "-r" rev "--no-patch"
+ "-T" "self.local_bookmarks().map(|b| b.name()) ++ \"\n\"")
+ " " t "\n"))
(bookmarks
(if (< 1 (length revision-bookmarks))
(completing-read-multiple "Delete bookmarks: "
revision-bookmarks nil t)