emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Option to customize the -m message flag of cvs?


From: Dan Nicolaescu
Subject: Re: Option to customize the -m message flag of cvs?
Date: Tue, 6 Jan 2009 08:08:31 -0800 (PST)

martin rudalics <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]