branch: externals/vc-jj
commit 65875ac33e5b8636a80c5294602845a4f135c745
Author: Kristoffer Balintona <krisbalint...@gmail.com>
Commit: Rudi Schlatte <r...@noreply.codeberg.org>

    Implement retrieve-tag function
    
    Define new function `vc-jj-retrieve-tag`.  With `vc-jj-retrieve-tag`,
    functions that use `vc-retrieve-tag` now work with vc-jj, like
    `vc-switch-branch`.
---
 vc-jj.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/vc-jj.el b/vc-jj.el
index 005f89ea28..efed1b8a2e 100644
--- a/vc-jj.el
+++ b/vc-jj.el
@@ -606,7 +606,7 @@ If REV is not specified, revert the file as with 
`vc-jj-revert'."
 (defun vc-jj-edit-change ()
   (interactive)
   (let ((rev (log-view-current-tag)))
-    (vc-jj--command-dispatched nil 0 nil "edit" rev "--quiet")
+    (vc-jj-retrieve-tag nil rev nil)
     (vc-jj--reload-log-buffers)))
 
 (defun vc-jj-abandon-change ()
@@ -730,6 +730,13 @@ four groups: change id, author, datetime, line number.")
           `(metadata . ((display-sort-function . ,#'identity)))
         (complete-with-action action revisions string pred)))))
 
+(defun vc-jj-retrieve-tag (_dir rev _update)
+  "Call jj edit on REV inside DIR.
+REV is the change ID of a jj revision.
+
+_DIR and _UPDATE are as described in the vc.el specification."
+  (vc-jj--command-dispatched nil 0 nil "edit" rev "--quiet"))
+
 (defvar vc-jj-pull-history nil
   "History variable for `vc-jj-pull'.")
 

Reply via email to