diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index befaabd5c6..e7b7de38e6 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -145,6 +145,16 @@ switches." :version "25.1" :group 'vc-hg) +(defcustom vc-hg-revert-switches t + "String or list of strings specifying switches for hg revert +under VC. If t, use no switches." + ;; No nil option, since there's no `vc-revert-switches' variable. + :type '(choice (const :tag "None" t) + (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 +1171,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.