GNU bug report logs - #8389
feature proposal: chng login vc-rcs-checkin

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Uwe Brauer <oub@HIDDEN>; dated Thu, 31 Mar 2011 14:16:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Mar 2011 14:15:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 31 10:15:48 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Q5If2-00022u-52
	for submit <at> debbugs.gnu.org; Thu, 31 Mar 2011 10:15:48 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <oub.oub.oub@HIDDEN>) id 1Q5Iey-00022h-Tc
	for submit <at> debbugs.gnu.org; Thu, 31 Mar 2011 10:15:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <oub.oub.oub@HIDDEN>) id 1Q5Ies-0008DP-7p
	for submit <at> debbugs.gnu.org; Thu, 31 Mar 2011 10:15:35 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,
	T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([199.232.76.165]:42222)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <oub.oub.oub@HIDDEN>) id 1Q5Ies-0008DJ-4N
	for submit <at> debbugs.gnu.org; Thu, 31 Mar 2011 10:15:34 -0400
Received: from [140.186.70.92] (port=46220 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q5Ieq-0001VW-Qq
	for bug-gnu-emacs@HIDDEN; Thu, 31 Mar 2011 10:15:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <oub.oub.oub@HIDDEN>) id 1Q5Iep-0008Bq-AP
	for bug-gnu-emacs@HIDDEN; Thu, 31 Mar 2011 10:15:32 -0400
Received: from mail-wy0-f169.google.com ([74.125.82.169]:33449)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <oub.oub.oub@HIDDEN>) id 1Q5Iep-0008B3-35
	for bug-gnu-emacs@HIDDEN; Thu, 31 Mar 2011 10:15:31 -0400
Received: by wyf19 with SMTP id 19so2449165wyf.0
	for <bug-gnu-emacs@HIDDEN>; Thu, 31 Mar 2011 07:15:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:sender:x-mailer:x-hashcash:to:subject:reply-to
	:from:date:message-id:user-agent:mime-version:content-type;
	bh=/pFsdIWPM/CrLNi/OYqQsV0kSpeSn92LT91/30cp6nw=;
	b=Ai3X+kMjtuflTSMmSAd5fPPoF+MfmPqZTgCEyI67b/jQkl76t7P/jw5Iwua7PeMRns
	03/2Kr+x94tl2iwAFb24TlyQY29GjU9g6dN1fDlIfGpXoOLo09NfrDtc8bQ+yfWcZEXK
	aS4qSeQ0CmD4Kjv3tblJhx6zTtSp2nPL/RF84=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:x-mailer:x-hashcash:to:subject:reply-to:from:date:message-id
	:user-agent:mime-version:content-type;
	b=ANhrZyMcwa2DdpClgpl0Pw5xD/6h04jPrZqD3GATikcIXj8NKG2yjuqWo2AknhlJug
	LyruPmLUjV5N8RSuskqX6OIMpP/RuALGyFmqG1AoOVQifWXcxWFm+nxV3VU25+Tv9guV
	BnhnM3c2H4uvf7qpOTgoYtcnlnP6kC2LfW+uM=
Received: by 10.227.149.19 with SMTP id r19mr2733194wbv.158.1301580929363;
	Thu, 31 Mar 2011 07:15:29 -0700 (PDT)
Received: from gilgamesch.quim.ucm.es (maportatil12.quim.ucm.es [147.96.6.137])
	by mx.google.com with ESMTPS id p5sm672849wbg.62.2011.03.31.07.15.26
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 31 Mar 2011 07:15:27 -0700 (PDT)
X-Mailer: 21.4 (patch 21) "Educational Television" XEmacs Lucid (via feedmail
	11-beta-1 I)
X-Hashcash: 1:20:110331:bug-gnu-emacs@HIDDEN::4yM2Nu+i5hIDGFAT:00000000000000000000000000000000000000001O6c
To: bug-gnu-emacs@HIDDEN
Subject: feature proposal: chng login vc-rcs-checkin
From: Uwe Brauer <oub@HIDDEN>
Date: Thu, 31 Mar 2011 16:15:38 +0200
Message-ID: <87pqp78jg5.fsf@HIDDEN>
User-Agent: Gnus/5.110011 (No Gnus v0.11) XEmacs/21.4.21 (linux)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 199.232.76.165
X-Spam-Score: -5.8 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Uwe Brauer <oub@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.8 (-----)


Hello

When collaborating with someone I find it useful to use vc
(rcs) and change the login accordingly when I checkin a new
version. The following code does it, but maybe there are
more sophisticated versions possible.


Uwe Brauer 



(defvar vc-rcs-ask-for-login nil
  "*Variable which allows to change the login Id by a y-or-n question.")
 

(defun vc-rcs-checkin (file rev comment)
  "RCS-specific version of `vc-backend-checkin'. If the variable
vc-rcs-ask-for-login is set to t, function asks for user login.
Useful for collaboration to distinguish different checkins."
;;(interactive "p")
  (let ((switches (vc-switches 'RCS 'checkin)))
    (let ((old-version (vc-workfile-version file)) new-version
		  (default-branch (vc-file-getprop file 'vc-rcs-default-branch)))
      ;; Force branch creation if an appropriate
      ;; default branch has been set.
      (and (not rev)
		   default-branch
		   (string-match (concat "^" (regexp-quote old-version) "\\.")
						 default-branch)
		   (setq rev default-branch)
		   (setq switches (cons "-f" switches)))
      (if (and (not rev) old-version)
          (setq rev (vc-branch-part old-version)))
      (apply 'vc-do-command nil 0 "ci" (vc-name file)
			 ;; if available, use the secure check-in option
			 (and (vc-rcs-release-p "5.6.4") "-j")
			 (concat (if vc-keep-workfiles "-u" "-r") rev)
			 (if vc-rcs-ask-for-login 
				 (if (y-or-n-p (format "Do you want to change the login  "))
					 (concat "-w" (read-string "Enter New login: "))
			   (concat "-m" comment)))
			 (concat "-m" comment)
			 switches)
      (vc-file-setprop file 'vc-workfile-version nil)

      ;; determine the new workfile version
      (set-buffer "*vc*")
      (goto-char (point-min))
      (when (or (re-search-forward
				 "new revision: \\([0-9.]+\\);" nil t)
				(re-search-forward
				 "reverting to previous revision \\([0-9.]+\\)" nil t))
		(setq new-version (match-string 1))
		(vc-file-setprop file 'vc-workfile-version new-version))

      ;; if we got to a different branch, adjust the default
      ;; branch accordingly
      (cond
       ((and old-version new-version
			 (not (string= (vc-branch-part old-version)
						   (vc-branch-part new-version))))
		(vc-rcs-set-default-branch file
								   (if (vc-trunk-p new-version) nil
									 (vc-branch-part new-version)))
		;; If this is an old RCS release, we might have
		;; to remove a remaining lock.
		(if (not (vc-rcs-release-p "5.6.2"))
			;; exit status of 1 is also accepted.
			;; It means that the lock was removed before.
			(vc-do-command nil 1 "rcs" (vc-name file)
						   (concat "-u" old-version))))))))




   



If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/22.2/etc/DEBUG for instructions.


In GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2010-03-26 on palmer, modified by Ubuntu
Windowing system distributor `The X.Org Foundation', version 11.0.10600000
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim' '--with-x=yes' '--with-x-toolkit=athena' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  global-pabbrev-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
y C-x C-g C-g M-x e m a s c SPC r <backspace> <backspace> 
<backspace> c d SPC <backspace> <backspace> s c <backspace> 
<backspace> c s SPC r e p o r <tab> <M-backspace> b 
<help-echo> <tab> <M-backspace> <M-backspace> b u g 
SPC C-h <help-echo> a b <help-echo> u g <return> C-x 
o C-s e m a c s C-s C-x o M-x r e p o r t SPC e m <tab> 
<return>

Recent messages:
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.

For information about GNU Emacs and the GNU system, type C-h C-a.
Quit [2 times]
Loading apropos...done
Type C-x 1 to remove help window.  
Mark saved where search started
Loading emacsbug...done





Acknowledgement sent to Uwe Brauer <oub@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#8389; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.