From unknown Tue Aug 12 08:32:46 2025 X-Loop: don@donarmstrong.com Subject: bug#1017: vc-diff for the hg backend ignore diff switches variables Reply-To: Francesco Potorti` , 1017@debbugs.gnu.org Resent-From: Francesco Potorti` Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 23 Sep 2008 15:05:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1017 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12221818858462 (code B ref -1); Tue, 23 Sep 2008 15:05:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.6 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Sep 2008 14:58:05 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8NEvwve008456 for ; Tue, 23 Sep 2008 07:58:00 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ki9Kw-0000By-BK for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 10:57:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ki9Ku-0000Aj-DD for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 10:57:57 -0400 Received: from [199.232.76.173] (port=37227 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ki9Ku-0000Ae-72 for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 10:57:56 -0400 Received: from mx4.isti.cnr.it ([194.119.192.6]:63201 helo=ITANIUM.ISTI.CNR.IT) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ki9Kt-0006F9-Pr for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 10:57:56 -0400 Received: from conversionlocal.isti.cnr.it by mx.isti.cnr.it (PMDF V6.4-beta #31598) id <01MZWPGJ8N5C9S4ISQ@mx.isti.cnr.it> for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 16:57:25 +0200 Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) by mx.isti.cnr.it (PMDF V6.4-beta #31599) with ESMTPSA id <01MZWPGIVM629QUZA3@mx.isti.cnr.it> for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 16:57:24 +0200 Received: from pot by tucano.isti.cnr.it with local (Exim 4.69) (envelope-from ) id 1Ki9KO-0007wu-G8 for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 16:57:24 +0200 Date: Tue, 23 Sep 2008 16:57:24 +0200 From: Francesco Potorti` To: GNU emacs bug list Message-id: Organization: X-INSM-ip-source: 146.48.81.102 Auth Done X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Three related problems: 1) Apparently the hg backend of vc ignores both diff-switches and vc-diff-switches. 2) The vc-hg-diff-switches variables is not defined. 3) The hg backend is special with respect to the vc-diff-switches variable. Its doc says: A string or list of strings specifying switches for diff under VC. When running diff under a given BACKEND, VC concatenates the values of `diff-switches', `vc-diff-switches', and `vc-BACKEND-diff-switches' to get the switches for that command. Thus, `vc-diff-switches' should contain switches that are specific to version control, but not specific to any particular backend. This behaviour assumes that the diff switches can be accumulated. however, it does not allow for removing them for a particular backend. For example, I have (setq diff-switches "-pu" vc-diff-switches "-b") which works for the cvs and rcs backends. However, it would not work for the hg backend, as 'hg diff' does not tolerate the -u option. This problem would require a different way of combining the diff switches. From unknown Tue Aug 12 08:32:46 2025 X-Loop: don@donarmstrong.com Subject: bug#1017: vc-diff for the hg backend ignore diff switches variables Reply-To: Glenn Morris , 1017@debbugs.gnu.org Resent-From: Glenn Morris Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 28 Sep 2008 02:10:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1017 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1017-submit@emacsbugs.donarmstrong.com id=B1017.122256729816380 (code B ref 1017); Sun, 28 Sep 2008 02:10:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-12.1 required=4.0 tests=AWL,BAYES_00, FVGT_m_MULTI_ODD,HAS_BUG_NUMBER,MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1017) by emacsbugs.donarmstrong.com; 28 Sep 2008 02:01:38 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8S21ZZI016373 for <1017@emacsbugs.donarmstrong.com>; Sat, 27 Sep 2008 19:01:36 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KjlZE-0007cE-RI; Sat, 27 Sep 2008 21:59:24 -0400 From: Glenn Morris To: Francesco Potorti` Cc: 1017@debbugs.gnu.org References: X-Spook: Serbian FTS2000 Telex Iran Saddam Hussein offensive X-Ran: Q\:1K(S-D(2b?JWHSl>t,{bjLlhU`pWA>w,FiuMSUXoF0iOq:KV]6m6]b)F%e=x%wYBpj; X-Hue: red X-Attribution: GM Date: Sat, 27 Sep 2008 21:59:24 -0400 In-Reply-To: (Francesco Potorti`'s message of "Tue, 23 Sep 2008 16:57:24 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Francesco Potorti` wrote: > 1) > Apparently the hg backend of vc ignores both diff-switches and > vc-diff-switches. > > 2) > The vc-hg-diff-switches variables is not defined. > > 3) > The hg backend is special with respect to the vc-diff-switches > variable. I don't use hg, but try the included patch, based on vc-svn. [vc-diff-switches] > A string or list of strings specifying switches for diff under VC. > When running diff under a given BACKEND, VC concatenates the values of > `diff-switches', `vc-diff-switches', and `vc-BACKEND-diff-switches' to > get the switches for that command. Thus, `vc-diff-switches' should > contain switches that are specific to version control, but not > specific to any particular backend. The above does not appear to be true. The `vc-switches' command uses either vc-BACKEND-diff-switches, or vc-diff-switches, or diff-switches. It does not append any of these. Most vc-BACKEND-diff commands seem to use the above behaviour. vc-cvs-diff appends diff-switches and vc-diff-switches, but only if it does not have to call cvs to get a diff. If it does, it uses the vc-switches method. vc-mtn-diff and vc-git-diff don't use any switches. It is all rather confusing... *** vc-hg.el.~1.85.~ 2008-07-05 12:09:45.000000000 -0700 --- vc-hg.el 2008-09-27 18:29:00.000000000 -0700 *************** *** 123,128 **** --- 123,142 ---- :version "22.2" :group 'vc) + (defcustom vc-hg-diff-switches + t ; Hg doesn't support common args like -u + "String or list of strings specifying extra switches for Hg diff under VC. + If nil, use the value of `vc-diff-switches'. + If you want to force an empty list of arguments, use t." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" + :value ("") + string)) + :version "23.1" + :group 'vc) + ;;; Properties of the backend *************** *** 248,254 **** (defun vc-hg-diff (files &optional oldvers newvers buffer) "Get a difference report using hg between two revisions of FILES." (let* ((firstfile (car files)) ! (working (and firstfile (vc-working-revision firstfile)))) (when (and (equal oldvers working) (not newvers)) (setq oldvers nil)) (when (and (not oldvers) newvers) --- 262,270 ---- (defun vc-hg-diff (files &optional oldvers newvers buffer) "Get a difference report using hg between two revisions of FILES." (let* ((firstfile (car files)) ! (working (and firstfile (vc-working-revision firstfile))) ! (switches ! (vc-switches (if vc-hg-diff-switches 'HG) 'diff))) (when (and (equal oldvers working) (not newvers)) (setq oldvers nil)) (when (and (not oldvers) newvers) *************** *** 259,264 **** --- 275,281 ---- (expand-file-name default-directory)) "diff" (append + switches (when oldvers (if newvers (list "-r" oldvers "-r" newvers) From unknown Tue Aug 12 08:32:46 2025 X-Loop: don@donarmstrong.com Subject: bug#1017: vc-diff for the hg backend ignore diff switches variables Reply-To: Glenn Morris , 1017@debbugs.gnu.org Resent-From: Glenn Morris Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 04 Oct 2008 20:40:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1017 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: moreinfo patch Received: via spool by 1017-submit@emacsbugs.donarmstrong.com id=B1017.1223152406635 (code B ref 1017); Sat, 04 Oct 2008 20:40:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-12.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1017) by emacsbugs.donarmstrong.com; 4 Oct 2008 20:33:26 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m94KXNw3000629 for <1017@emacsbugs.donarmstrong.com>; Sat, 4 Oct 2008 13:33:24 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KmDmK-0007y5-Kt; Sat, 04 Oct 2008 16:31:04 -0400 From: Glenn Morris To: 1017@debbugs.gnu.org Cc: Francesco Potorti` References: X-Spook: UMTS MD2 Israel DES infowar Project Monarch Maple Abbas X-Ran: }C6M^JA%t)>@ZFs$`j.g~B3Gmbcm`RjHzCKu=j^WaX>e[Tmr0rA%"/#-",-?+0na9Y?9N" X-Hue: red X-Attribution: GM Date: Sat, 04 Oct 2008 16:31:04 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Since I do not use Mercurial, I need someone who does to check that patch works. From unknown Tue Aug 12 08:32:46 2025 X-Loop: don@donarmstrong.com Subject: bug#1384: Reply-To: Glenn Morris , 1384-quiet@debbugs.gnu.org Resent-From: Glenn Morris Resent-To: Resent-Date: Wed, 26 Nov 2008 03:10:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1384 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1384-quiet@emacsbugs.donarmstrong.com id=Q1384.122766866330599 (code Q ref 1384); Wed, 26 Nov 2008 03:10:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.4 required=4.0 tests=AWL,BAYES_00,FAKE_REPLY_C, ONEWORD,RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1384-quiet) by emacsbugs.donarmstrong.com; 26 Nov 2008 03:04:23 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAQ34LvX030593 for <1384-quiet@emacsbugs.donarmstrong.com>; Tue, 25 Nov 2008 19:04:22 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1L5Ah9-0001px-8L; Tue, 25 Nov 2008 22:04:03 -0500 From: Glenn Morris To: 1384-quiet@debbugs.gnu.org X-Spook: Kosovo quarter Project Monarch insurgency anthrax X-Ran: z~N1;D~n>e65>\2FFyh#;Yevrh\2?}R]jmcW79X"lUgEUXf#n&`Rlszr_31Pyn@4act9#* X-Hue: black X-Attribution: GM Date: Tue, 25 Nov 2008 22:04:03 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I think the only remaining issues are: i) vc-arch does not apply any diff switches (arch's diff does not seem to accept many). ii) vc-cvs uses the switches in different ways depending on whether it needs to call cvs or not. iii) many backends don't append the various diff switches, as previously described in the behavior of vc-switches. From unknown Tue Aug 12 08:32:46 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Glenn Morris Subject: bug#1384 closed by Glenn Morris (Re: Bug#1384) Message-ID: References: <18742.15462.814713.128649@fencepost.gnu.org> X-Emacs-PR-Message: they-closed 1384 X-Emacs-PR-Package: emacs Reply-To: 1384@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1228291805-7834-1" This is a multi-part message in MIME format... ------------=_1228291805-7834-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #1384: vc-diff-switches inconsistencies It has been closed by Glenn Morris . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Glenn Morris by replying to this email. --=20 1384: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1384 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1228291805-7834-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From rgm@gnu.org Wed Dec 3 00:00:05 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.8 required=4.0 tests=AWL,BAYES_00,ONEWORD, RCVD_IN_DNSWL_MED,UNRESOLVED_TEMPLATE,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1384-done) by emacsbugs.donarmstrong.com; 3 Dec 2008 08:00:05 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB3802Bv004521 for <1384-done@emacsbugs.donarmstrong.com>; Wed, 3 Dec 2008 00:00:03 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1L7mdz-0005O3-0Y; Wed, 03 Dec 2008 02:59:35 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18742.15462.814713.128649@fencepost.gnu.org> Date: Wed, 3 Dec 2008 02:59:34 -0500 From: Glenn Morris To: 1384-done@debbugs.gnu.org Subject: Re: Bug#1384 X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: black X-Ran: _zsI;tyVKJ@{V(&.B),)TyjGGf(I3B]{Z7V-<[W=ugg[b3O@5ouv%:U\ZIU>%X_]P_LX+. X-Debbugs-No-Ack: yes I believe this is tidied up now. ------------=_1228291805-7834-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From pot@gnu.org Tue Sep 23 07:58:05 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.6 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Sep 2008 14:58:05 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8NEvwve008456 for ; Tue, 23 Sep 2008 07:58:00 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ki9Kw-0000By-BK for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 10:57:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ki9Ku-0000Aj-DD for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 10:57:57 -0400 Received: from [199.232.76.173] (port=37227 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ki9Ku-0000Ae-72 for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 10:57:56 -0400 Received: from mx4.isti.cnr.it ([194.119.192.6]:63201 helo=ITANIUM.ISTI.CNR.IT) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ki9Kt-0006F9-Pr for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 10:57:56 -0400 Received: from conversionlocal.isti.cnr.it by mx.isti.cnr.it (PMDF V6.4-beta #31598) id <01MZWPGJ8N5C9S4ISQ@mx.isti.cnr.it> for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 16:57:25 +0200 Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) by mx.isti.cnr.it (PMDF V6.4-beta #31599) with ESMTPSA id <01MZWPGIVM629QUZA3@mx.isti.cnr.it> for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 16:57:24 +0200 Received: from pot by tucano.isti.cnr.it with local (Exim 4.69) (envelope-from ) id 1Ki9KO-0007wu-G8 for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2008 16:57:24 +0200 Date: Tue, 23 Sep 2008 16:57:24 +0200 From: Francesco Potorti` Subject: vc-diff for the hg backend ignore diff switches variables To: GNU emacs bug list Message-id: Organization: X-INSM-ip-source: 146.48.81.102 Auth Done X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Three related problems: 1) Apparently the hg backend of vc ignores both diff-switches and vc-diff-switches. 2) The vc-hg-diff-switches variables is not defined. 3) The hg backend is special with respect to the vc-diff-switches variable. Its doc says: A string or list of strings specifying switches for diff under VC. When running diff under a given BACKEND, VC concatenates the values of `diff-switches', `vc-diff-switches', and `vc-BACKEND-diff-switches' to get the switches for that command. Thus, `vc-diff-switches' should contain switches that are specific to version control, but not specific to any particular backend. This behaviour assumes that the diff switches can be accumulated. however, it does not allow for removing them for a particular backend. For example, I have (setq diff-switches "-pu" vc-diff-switches "-b") which works for the cvs and rcs backends. However, it would not work for the hg backend, as 'hg diff' does not tolerate the -u option. This problem would require a different way of combining the diff switches. ------------=_1228291805-7834-1--