summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-svn.el
diff options
context:
space:
mode:
authorTassilo Horn <tsdh@gnu.org>2020-06-14 18:24:14 +0200
committerTassilo Horn <tsdh@gnu.org>2020-06-14 21:37:26 +0200
commit4f92cf14f395577572d451c0488ade952bc3cbaa (patch)
tree820eed49dd74aeb028c962adfb221b9a3ff922e3 /lisp/vc/vc-svn.el
parente96f78fca672c74b7bf1120b7683a50295418725 (diff)
downloademacs-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-svn.el')
-rw-r--r--lisp/vc/vc-svn.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index d039bf3c6a3..6ab07c1476d 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -816,7 +816,14 @@ Set file properties accordingly. If FILENAME is non-nil, return its status."
(push (match-string 1 loglines) vc-svn-revisions)
(setq start (+ start (match-end 0)))
(setq loglines (buffer-substring-no-properties start (point-max)))))
- vc-svn-revisions)))
+ vc-svn-revisions)))
+
+(defun vc-svn-repository-url (file-or-dir)
+ (let ((default-directory (vc-svn-root file-or-dir)))
+ (with-temp-buffer
+ (vc-svn-command (current-buffer) 0 nil
+ "info" "--show-item" "repos-root-url")
+ (buffer-substring-no-properties (point-min) (1- (point-max))))))
(provide 'vc-svn)