branch: externals/vc-hgcmd
commit 5c735b3e3897b7ba52b5ac4e6a2f43ca283fd52d
Author: muffinmad <andreyk....@gmail.com>
Commit: muffinmad <andreyk....@gmail.com>

    Implement repository-url
---
 vc-hgcmd.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/vc-hgcmd.el b/vc-hgcmd.el
index 1025981..8df4653 100644
--- a/vc-hgcmd.el
+++ b/vc-hgcmd.el
@@ -5,7 +5,7 @@
 ;; Author: Andrii Kolomoiets <andreyk....@gmail.com>
 ;; Keywords: vc
 ;; URL: https://github.com/muffinmad/emacs-vc-hgcmd
-;; Package-Version: 1.11
+;; Package-Version: 1.12
 ;; Package-Requires: ((emacs "25.1"))
 
 ;; This file is NOT part of GNU Emacs.
@@ -95,6 +95,7 @@
 ;; - extra-menu ()                                 OK shelve, addremove
 ;; - extra-dir-menu ()                             OK extra-status-menu same 
as extra-menu
 ;; - conflicted-files (dir)                        OK with no respect to DIR
+;; - repository-url (file-or-dir)                  OK
 ;;
 ;; VC backend to work with hg repositories through hg command server.
 ;; https://www.mercurial-scm.org/wiki/CommandServer
@@ -1543,6 +1544,11 @@ If FILES is nil show diff for whole changeset."
   "Return the ignore file of the repository of FILE."
   (expand-file-name ".hgignore" (vc-hgcmd-root file)))
 
+(defun vc-hgcmd-repository-url (file-or-dir &optional remote)
+  "Return the URL of REMOTE or default repository of FILE-OR-DIR."
+  (let ((default-directory (vc-hgcmd-root file-or-dir)))
+    (vc-hgcmd-command "config" (concat "paths." (or remote "default")))))
+
 (defun vc-hgcmd-runcommand (command)
   "Run custom hg COMMAND."
   (interactive "sRun hg: ")

Reply via email to