diff options
author | Tassilo Horn <tsdh@gnu.org> | 2020-06-14 18:24:14 +0200 |
---|---|---|
committer | Tassilo Horn <tsdh@gnu.org> | 2020-06-14 21:37:26 +0200 |
commit | 4f92cf14f395577572d451c0488ade952bc3cbaa (patch) | |
tree | 820eed49dd74aeb028c962adfb221b9a3ff922e3 /lisp/vc/vc-bzr.el | |
parent | e96f78fca672c74b7bf1120b7683a50295418725 (diff) | |
download | emacs-4f92cf14f395577572d451c0488ade952bc3cbaa.tar.gz |
Add new VC command `repository-url'
* lisp/vc/vc.el: Document repository-url command.
* lisp/vc/vc-bzr.el (vc-bzr-repository-url): New defun.
* lisp/vc/vc-git.el (vc-git-repository-url): New defun.
* lisp/vc/vc-hg.el (vc-hg-repository-url): New defun.
* lisp/vc/vc-svn.el (vc-svn-repository-url): New defun.
Diffstat (limited to 'lisp/vc/vc-bzr.el')
-rw-r--r-- | lisp/vc/vc-bzr.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index e5d307e7ede..21c7e7cfab1 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -1316,6 +1316,15 @@ stream. Standard error output is discarded." vc-bzr-revision-keywords)) string pred))))) +(defun vc-bzr-repository-url (file-or-dir) + (let ((default-directory (vc-bzr-root file-or-dir))) + (with-temp-buffer + (vc-bzr-command "info" (current-buffer) 0 nil) + (goto-char (point-min)) + (if (re-search-forward "parent branch: \\(.*\\)$" nil t) + (match-string 1) + (error "Cannot determine Bzr repository URL"))))) + (provide 'vc-bzr) ;;; vc-bzr.el ends here |