vc-bzr-revision-keywords))
string pred)))))
-(defun vc-bzr-repository-url (file-or-dir)
+(defun vc-bzr-repository-url (file-or-dir &optional _remote-name)
(let ((default-directory (vc-bzr-root file-or-dir)))
(with-temp-buffer
(vc-bzr-command "info" (current-buffer) 0 nil)
"DU" "AA" "UU"))
(push (expand-file-name file directory) files)))))))
-(defun vc-git-repository-url (file-or-dir)
+(defun vc-git-repository-url (file-or-dir &optional remote-name)
(let ((default-directory (vc-git-root file-or-dir)))
(with-temp-buffer
- (vc-git-command (current-buffer) 0 nil "remote" "get-url" "origin")
+ (vc-git-command (current-buffer) 0 nil "remote" "get-url"
+ (or remote-name "origin"))
(buffer-substring-no-properties (point-min) (1- (point-max))))))
;; Everywhere but here, follows vc-git-command, which uses vc-do-command
(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)
(setq loglines (buffer-substring-no-properties start (point-max)))))
vc-svn-revisions)))
-(defun vc-svn-repository-url (file-or-dir)
+(defun vc-svn-repository-url (file-or-dir &optional _remote-name)
(let ((default-directory (vc-svn-root file-or-dir)))
(with-temp-buffer
(vc-svn-command (current-buffer) 0 nil
;; the project that contains DIR.
;; FIXME: what should it do with non-text conflicts?
;;
-;; - repository-url (file)
+;; - repository-url (file-or-dir &optional remote-name)
;;
-;; Returns the URL of the repository of the current checkout.
+;; Returns the URL of the repository of the current checkout
+;; containing FILE-OR-DIR. The optional REMOTE-NAME specifies the
+;; remote (in Git parlance) whose URL is to be returned. It has
+;; only a meaning for distributed VCS and is ignored otherwise.
;;; Changes from the pre-25.1 API:
;;