diff options
author | Philip Kaludercic <philipk@posteo.net> | 2022-10-23 18:04:55 +0200 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2022-10-23 18:04:55 +0200 |
commit | 2154219059a21d6aad2e7e390187d78029fff3d0 (patch) | |
tree | 81573032a66e7f9cd941a22389ecd5d1f5d638b8 /lisp/vc/vc-hg.el | |
parent | a0532e148cca6fc9ede11fda2c9dda20cac4eca5 (diff) | |
download | emacs-2154219059a21d6aad2e7e390187d78029fff3d0.tar.gz emacs-2154219059a21d6aad2e7e390187d78029fff3d0.tar.bz2 emacs-2154219059a21d6aad2e7e390187d78029fff3d0.zip |
Immediately check out the right branch or revision
* lisp/emacs-lisp/package-vc.el (package-vc-unpack) Use REV to avoid
checking out the wrong branch/revision first.
* lisp/vc/vc-bzr.el: Handle REV.
* lisp/vc/vc-git.el: Handle REV.
* lisp/vc/vc-hg.el: Handle REV.
* lisp/vc/vc-svn.el: Handle REV.
* lisp/vc/vc.el: Make BACKEND optional and add REV.
Diffstat (limited to 'lisp/vc/vc-hg.el')
-rw-r--r-- | lisp/vc/vc-hg.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 3ea4c5d32cd..1fb91c6452a 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1250,8 +1250,11 @@ REV is the revision to check out into WORKFILE." (add-hook 'after-save-hook #'vc-hg-resolve-when-done nil t) (vc-message-unresolved-conflicts buffer-file-name))) -(defun vc-hg-clone (remote directory) - (vc-hg-command nil 0 '() "clone" remote directory) +(defun vc-hg-clone (remote directory rev) + (if rev + (vc-hg-command nil 0 '() "clone" "--rev" rev remote directory) + (vc-hg-command nil 0 '() "clone" remote directory)) + directory) ;; Modeled after the similar function in vc-bzr.el |