From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uwe Brauer Newsgroups: gmane.emacs.bugs Subject: bug#8389: feature proposal: chng login vc-rcs-checkin Date: Thu, 31 Mar 2011 16:15:38 +0200 Message-ID: <87pqp78jg5.fsf@gilgamesch.quim.ucm.es> Reply-To: Uwe Brauer NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1301582290 7386 80.91.229.12 (31 Mar 2011 14:38:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2011 14:38:10 +0000 (UTC) To: 8389@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 31 16:38:03 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q5J0b-0005CS-UU for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Mar 2011 16:38:02 +0200 Original-Received: from localhost ([127.0.0.1]:44441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5J0Y-0004Ui-DE for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Mar 2011 10:37:58 -0400 Original-Received: from [140.186.70.92] (port=57645 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5Izv-00049l-RX for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 10:37:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5Izq-0005Gz-J6 for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 10:37:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:32847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5Izq-0005Gv-HZ for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 10:37:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q5IfJ-00023R-S4; Thu, 31 Mar 2011 10:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Uwe Brauer Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Mar 2011 14:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8389 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13015809487874 (code B ref -1); Thu, 31 Mar 2011 14:16:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Mar 2011 14:15:48 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q5If2-00022u-52 for submit@debbugs.gnu.org; Thu, 31 Mar 2011 10:15:48 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q5Iey-00022h-Tc for submit@debbugs.gnu.org; Thu, 31 Mar 2011 10:15:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5Ies-0008DP-7p for submit@debbugs.gnu.org; Thu, 31 Mar 2011 10:15:35 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:42222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5Ies-0008DJ-4N for submit@debbugs.gnu.org; Thu, 31 Mar 2011 10:15:34 -0400 Original-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@gnu.org; Thu, 31 Mar 2011 10:15:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5Iep-0008Bq-AP for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 10:15:32 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:33449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5Iep-0008B3-35 for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 10:15:31 -0400 Original-Received: by wyf19 with SMTP id 19so2449165wyf.0 for ; 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= Original-Received: by 10.227.149.19 with SMTP id r19mr2733194wbv.158.1301580929363; Thu, 31 Mar 2011 07:15:29 -0700 (PDT) Original-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@gnu.org::4yM2Nu+i5hIDGFAT:00000000000000000000000000000000000000001O6c User-Agent: Gnus/5.110011 (No Gnus v0.11) XEmacs/21.4.21 (linux) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 31 Mar 2011 10:16:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45525 Archived-At: 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 c d SPC s c c s SPC r e p o r b b u g SPC C-h a b u g 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 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