From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: Option to customize the -m message flag of cvs? Date: Tue, 6 Jan 2009 08:08:31 -0800 (PST) Message-ID: <200901061608.n06G8V4j001426@mothra.ics.uci.edu> References: <49590470.4080306@gmx.at> <49593E94.4030501@gmx.at> <4959CD22.7090306@gmx.at> <495B381F.3010101@gmx.at> <49633914.7060604@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1231258159 14428 80.91.229.12 (6 Jan 2009 16:09:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Jan 2009 16:09:19 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 06 17:10:29 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LKEVW-0008T8-N2 for ged-emacs-devel@m.gmane.org; Tue, 06 Jan 2009 17:10:19 +0100 Original-Received: from localhost ([127.0.0.1]:56552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKEUG-00033W-BL for ged-emacs-devel@m.gmane.org; Tue, 06 Jan 2009 11:09:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKEU2-0002zl-3A for emacs-devel@gnu.org; Tue, 06 Jan 2009 11:08:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKEU1-0002zN-8Z for emacs-devel@gnu.org; Tue, 06 Jan 2009 11:08:45 -0500 Original-Received: from [199.232.76.173] (port=47464 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKEU1-0002zI-1X for emacs-devel@gnu.org; Tue, 06 Jan 2009 11:08:45 -0500 Original-Received: from sallyv2.ics.uci.edu ([128.195.1.120]:39676) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1LKETx-0006bx-PY; Tue, 06 Jan 2009 11:08:42 -0500 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id n06G8WqW001227; Tue, 6 Jan 2009 08:08:32 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n06G8V4j001426; Tue, 6 Jan 2009 08:08:31 -0800 (PST) In-Reply-To: <49633914.7060604@gmx.at> (martin rudalics's message of "Tue, 06 Jan 2009 11:57:24 +0100") Original-Lines: 103 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n06G8WqW001227 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107643 Archived-At: martin rudalics writes: > >> Does `vc-dir' work for you? > > > > I don't use it. > > Apparently only Juanma and me are presently using `vc-dir' on Windows. > So if there are no objections I'd like to apply the attached patch. I'd like to strongly object to this type of change. The same goal can be accomplished by using a wrapper script for the cvs command that changes -m to -M, or by changing the CVSNT sources not to do this. This patch is proposed because CVSNT chose to annoy they users into paying for a license by inserting a commercial in the commit message. And asking users to use the non-standard -M flag in order to avoid that annoyance. There is no guarantee that the same thing will not be done in the future to other commands: like log, diff, annotate, etc. Which would mean that we'd have to continuously change both vc-cvs.el and PCL-CVS (which is not done here, but it's as needed) to keep up. The user needs to explicitly do something anyway, so better just have the user either avoid CVSNT, change the CVSNT source (and recompile)or use a wrapper script instead of littering the emacs code with this type of needless changes. > martin > *** vc-cvs.el.~1.163.~ 2009-01-05 10:00:27.031250000 +0100 > --- vc-cvs.el 2009-01-05 10:19:29.265625000 +0100 > *************** > *** 180,185 **** > --- 180,194 ---- > :version "22.1" > :group 'vc) > > + (defcustom vc-cvs-message-switch "-m" > + "String passed as message switch to CVS. > + By default this is \"-m\". With more recent versions of CVSNT > + you might want to set this to \"-M\" to avoid inserting adverts > + in commit logs." > + :type 'string > + :version "23.1" > + :group 'vc) > + > ;;; > ;;; Internal variables > ;;; > *************** > *** 288,294 **** > (apply 'vc-cvs-command nil 0 files > "add" > (and comment (string-match "[^\t\n ]" comment) > ! (concat "-m" comment)) > (vc-switches 'CVS 'register))) > > (defun vc-cvs-responsible-p (file) > --- 297,303 ---- > (apply 'vc-cvs-command nil 0 files > "add" > (and comment (string-match "[^\t\n ]" comment) > ! (concat vc-cvs-message-switch comment)) > (vc-switches 'CVS 'register))) > > (defun vc-cvs-responsible-p (file) > *************** > *** 325,331 **** > files))) > (let ((status (apply 'vc-cvs-command nil 1 files > "ci" (if rev (concat "-r" rev)) > ! (concat "-m" comment) > (vc-switches 'CVS 'checkin)))) > (set-buffer "*vc*") > (goto-char (point-min)) > --- 334,340 ---- > files))) > (let ((status (apply 'vc-cvs-command nil 1 files > "ci" (if rev (concat "-r" rev)) > ! (concat vc-cvs-message-switch comment) > (vc-switches 'CVS 'checkin)))) > (set-buffer "*vc*") > (goto-char (point-min)) > *************** > *** 485,491 **** > (defun vc-cvs-modify-change-comment (files rev comment) > "Modify the change comments for FILES on a specified REV. > Will fail unless you have administrative privileges on the repo." > ! (vc-cvs-command nil 0 files "admin" (concat "-m" rev ":" comment))) > > ;;; > ;;; History functions > --- 494,501 ---- > (defun vc-cvs-modify-change-comment (files rev comment) > "Modify the change comments for FILES on a specified REV. > Will fail unless you have administrative privileges on the repo." > ! (vc-cvs-command > ! nil 0 files "admin" (concat vc-cvs-message-switch rev ":" comment))) > > ;;; > ;;; History functions