From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ian Dunn Newsgroups: gmane.emacs.bugs Subject: bug#34305: [PATCH] Add switches to hg revert Date: Sun, 03 Feb 2019 21:55:50 -0500 Message-ID: <87tvhkcle1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="128592"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) To: 34305@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 04 03:57:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqURe-000XLU-4Y for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Feb 2019 03:57:14 +0100 Original-Received: from localhost ([127.0.0.1]:35054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqURd-0003pH-5h for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Feb 2019 21:57:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqURT-0003os-CO for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 21:57:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqURS-0006nn-Lz for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 21:57:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58659) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqURS-0006nB-GO for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 21:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gqURS-0000QV-AV for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 21:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ian Dunn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Feb 2019 02:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34305 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15492489621562 (code B ref -1); Mon, 04 Feb 2019 02:57:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Feb 2019 02:56:02 +0000 Original-Received: from localhost ([127.0.0.1]:57940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqUQT-0000P0-Pe for submit@debbugs.gnu.org; Sun, 03 Feb 2019 21:56:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqUQS-0000Oj-Lx for submit@debbugs.gnu.org; Sun, 03 Feb 2019 21:56:01 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:40022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqUQM-0004mk-BY for submit@debbugs.gnu.org; Sun, 03 Feb 2019 21:55:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqUQL-0003l6-IA for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 21:55:54 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqUQJ-0004kn-JS for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 21:55:51 -0500 Original-Received: from [2604:6000:1006:8195:229c:c3cf:46a4:839a] (port=45590 helo=escafil) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gqUQJ-0004vf-E8 for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 21:55:51 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155068 Archived-At: --=-=-= Content-Type: text/plain * vc/vc-hg.el (vc-hg-revert-switches): New user variable. (vc-hg-revert): Use switches for revert. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=vc-hg.el.diff 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. --=-=-= Content-Type: text/plain -- Ian Dunn --=-=-=--