branch: externals/vc-jj
commit 3ab5aecc53268eb4ef9235aa8b521af44c39a648
Author: Kristoffer Balintona <[email protected]>
Commit: Kristoffer Balintona <[email protected]>
Implement the revision-published-p VC method
---
vc-jj.el | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/vc-jj.el b/vc-jj.el
index 59b7a0d763..77fc3d65ad 100644
--- a/vc-jj.el
+++ b/vc-jj.el
@@ -1246,6 +1246,18 @@ of FILE between lines LFROM and LTO."
;;;; last-change
+;;;; revision-published-p
+;; Emacs 31 method
+
+(defun vc-jj-revision-published-p (rev)
+ "Whether REV is pushed or not.
+Return t when REV has been pushed to a remote repository, and nil
+otherwise."
+ (member rev
+ (vc-jj--process-lines nil "log" "--no-graph"
+ "-r" "mutable()"
+ "-T" "self.change_id() ++ '\n'")))
+
;;; TAG/BRANCH SYSTEM
;;;; create-tag