mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Add optional remote-name argument to VC repository-url command
* lisp/vc/vc.el: Document new remote-name argument of VC repository-url command. * lisp/vc/vc-git.el (vc-git-repository-url): Add and use new arg. * lisp/vc/vc-hg.el (vc-hg-repository-url): Add and use new arg. * lisp/vc/vc-bzr.el (vc-bzr-repository-url): Add new arg but ignore it. * lisp/vc/vc-svn.el (vc-svn-repository-url): Add new arg but ignore it.
This commit is contained in:
parent
4f92cf14f3
commit
2e80328ba6
5 changed files with 13 additions and 8 deletions
|
|
@ -1525,11 +1525,12 @@ This function differs from vc-do-command in that it invokes
|
|||
(defun vc-hg-root (file)
|
||||
(vc-find-root file ".hg"))
|
||||
|
||||
(defun vc-hg-repository-url (file-or-dir)
|
||||
(defun vc-hg-repository-url (file-or-dir &optional remote-name)
|
||||
(let ((default-directory (vc-hg-root file-or-dir)))
|
||||
(with-temp-buffer
|
||||
(vc-hg-command (current-buffer) 0 nil
|
||||
"config" "paths.default")
|
||||
"config"
|
||||
(concat "paths." (or remote-name "default")))
|
||||
(buffer-substring-no-properties (point-min) (1- (point-max))))))
|
||||
|
||||
(provide 'vc-hg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue