diff options
author | Ian Dunn <dunni@gnu.org> | 2019-02-07 12:26:04 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2019-02-07 12:27:34 +0300 |
commit | 84b79f6a07bf45a27815f4793a7ee79a6d3610b3 (patch) | |
tree | 214da5e28fbcb9b7793870b8935cc413b646aafc /lisp/vc/vc-hg.el | |
parent | 5e627fa5f5db8f27ea789d61148e7d5ade644956 (diff) | |
download | emacs-84b79f6a07bf45a27815f4793a7ee79a6d3610b3.tar.gz |
Add vc-hg-revert-switches
* lisp/vc/vc-hg.el (vc-hg-revert-switches): New option.
(vc-hg-revert): Use it.
Diffstat (limited to 'lisp/vc/vc-hg.el')
-rw-r--r-- | lisp/vc/vc-hg.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index befaabd5c66..342c6d214cd 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -145,6 +145,15 @@ switches." :version "25.1" :group 'vc-hg) +(defcustom vc-hg-revert-switches nil + "String or list of strings specifying switches for hg revert +under VC." + :type '(choice (const :tag "None" nil) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "27.1" + :group 'vc-hg) + (defcustom vc-hg-program "hg" "Name of the Mercurial executable (excluding any arguments)." :type 'string @@ -1161,7 +1170,11 @@ REV is the revision to check out into WORKFILE." ;; Modeled after the similar function in vc-bzr.el (defun vc-hg-revert (file &optional contents-done) (unless contents-done - (with-temp-buffer (vc-hg-command t 0 file "revert")))) + (with-temp-buffer + (apply #'vc-hg-command + t 0 file + "revert" + (append (vc-switches 'hg 'revert)))))) ;;; Hg specific functionality. |