(vc-message-unresolved-conflicts buffer-file-name)))
(defun vc-bzr-clone (remote directory)
- (vc-bzr-command nil 0 '() "branch" remote directory))
+ (vc-bzr-command nil 0 '() "branch" remote directory)
+ directory)
(defun vc-bzr-version-dirstate (dir)
"Try to return as a string the bzr revision ID of directory DIR.
(vc-message-unresolved-conflicts buffer-file-name)))
(defun vc-hg-clone (remote directory)
- (vc-hg-command nil 0 '() "clone" remote directory))
+ (vc-hg-command nil 0 '() "clone" remote directory)
+ directory)
;; Modeled after the similar function in vc-bzr.el
(defun vc-hg-revert (file &optional contents-done)
(buffer-substring-no-properties (point-min) (1- (point-max))))))
(defun vc-svn-clone (remote directory)
- (vc-svn-command nil 0 '() "checkout" remote directory))
+ (vc-svn-command nil 0 '() "checkout" remote directory)
+ (file-name-concat directory "trunk"))
(provide 'vc-svn)
;; - clone (remote directory)
;;
;; Attempt to clone a REMOTE repository, into a local DIRECTORY.
-;; Returns the symbol of the backend used if successful.
+;; Returns a string with the directory with the contents of the
+;; repository if successful, otherwise nil.
;;; Changes from the pre-25.1 API:
;;
(defun vc-clone (backend remote &optional directory)
"Use BACKEND to clone REMOTE into DIRECTORY.
-If successful, returns the symbol of the backed used to clone.
-If BACKEND is nil, iterate through every known backend in
-`vc-handled-backends' until one succeeds."
+If successful, returns the a string with the directory of the
+checkout. If BACKEND is nil, iterate through every known backend
+in `vc-handled-backends' until one succeeds."
(unless directory
(setq directory default-directory))
(if backend
(progn
(unless (memq backend vc-handled-backends)
(error "Unknown VC backend %s" backend))
- (vc-call-backend backend 'clone remote directory)
- backend)
+ (vc-call-backend backend 'clone remote directory))
(catch 'ok
(dolist (backend vc-handled-backends)
(ignore-error vc-not-supported
- (when-let (res (vc-call-backend
- backend 'clone
- remote directory))
- (throw 'ok backend)))))))
+ (when-let ((res (vc-call-backend
+ backend 'clone
+ remote directory)))
+ (throw 'ok res)))))))
\f