From 9266b3947dae0207800e778e2c9628d316ad9d68 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 19 Jun 2020 16:54:54 +0100 Subject: feat(emacs-pkgs/tvl): Add #'tvl-depot-status function This function opens the depot in magit. By default the depot path is assumed to be `/depot`, but that is made available as a customise option that users can override. Change-Id: Iefc127cad515dbae330d7af3aa69a0c53aa02015 Reviewed-on: https://cl.tvl.fyi/c/depot/+/504 Reviewed-by: glittershark --- tools/emacs-pkgs/tvl/tvl.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools/emacs-pkgs/tvl') diff --git a/tools/emacs-pkgs/tvl/tvl.el b/tools/emacs-pkgs/tvl/tvl.el index 4947f66a65c9..cc50d6b234d4 100644 --- a/tools/emacs-pkgs/tvl/tvl.el +++ b/tools/emacs-pkgs/tvl/tvl.el @@ -25,6 +25,10 @@ "Name of the git remote for gerrit" :group 'tvl) +(defcustom tvl-depot-path "/depot" + "Location at which the TVL depot is checked out." + :group 'tvl) + (defun tvl--gerrit-ref (target-branch &optional flags) (let ((flag-suffix (if flags (format "%%l=%s" (s-join "," flags)) ""))) @@ -67,5 +71,10 @@ rubberstamp operation is dangerous and should only be used in #'magit-push ["r"] (list "P" "push, rubberstamp & submit to Gerrit" #'magit-gerrit-rubberstamp)) +(defun tvl-depot-status () + "Open the TVL monorepo in magit." + (interactive) + (magit-status tvl-depot-path)) + (provide 'tvl) ;;; tvl.el ends here -- cgit 1.4.1