From: Ian Dunn <dunni@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 34305@debbugs.gnu.org
Subject: bug#34305: [PATCH] Add switches to hg revert
Date: Wed, 06 Feb 2019 20:42:39 -0500 [thread overview]
Message-ID: <87k1ics7ao.fsf@gnu.org> (raw)
In-Reply-To: <820410bf-a952-039d-f742-68a0d5c01a2d@yandex.ru>
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
DG> On 04.02.2019 05:55, Ian Dunn wrote:
>> + ;; No nil option, since there's no `vc-revert-switches' variable.
DG> nil should still work (vc-switches checks whether vc-revert-switches is bound,
DG> it's not an error), and it would probably be more intuitive.
I see your point. `vc-bzr-log-switches' does this as well. I've updated the patch to use nil instead of t.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vc-hg.el.diff --]
[-- Type: text/x-patch, Size: 1049 bytes --]
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,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 +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.
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Ian Dunn
next prev parent reply other threads:[~2019-02-07 1:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-04 2:55 bug#34305: [PATCH] Add switches to hg revert Ian Dunn
2019-02-04 16:54 ` Eli Zaretskii
2019-02-05 15:42 ` Ian Dunn
2019-02-05 17:59 ` Dmitry Gutov
2019-02-07 1:42 ` Ian Dunn [this message]
2019-02-07 9:27 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1ics7ao.fsf@gnu.org \
--to=dunni@gnu.org \
--cc=34305@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.