GNU logs - #7171, boring messages


Message sent to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#7171: error	at vc-mtn-mode-line-string of vc-mtn.el
Resent-From: Masatake YAMATO <yamato@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-To: owner <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 07 Oct 2010 10:51:02 +0000
Resent-Message-ID: <handler.7171.B.128644861023202 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 7171
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 7171 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.128644861023202
          (code B ref -1); Thu, 07 Oct 2010 10:51:02 +0000
Received: (at submit) by debbugs.gnu.org; 7 Oct 2010 10:50:10 +0000
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 1P3o37-00062B-In
	for submit <at> debbugs.gnu.org; Thu, 07 Oct 2010 06:50:09 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <yamato@HIDDEN>) id 1P3o34-00061k-Jv
	for submit <at> debbugs.gnu.org; Thu, 07 Oct 2010 06:50:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <yamato@HIDDEN>) id 1P3o6B-0001nn-Ci
	for submit <at> debbugs.gnu.org; Thu, 07 Oct 2010 06:53:20 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI,
	T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([199.232.76.165]:33897)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <yamato@HIDDEN>) id 1P3o6B-0001nj-9z
	for submit <at> debbugs.gnu.org; Thu, 07 Oct 2010 06:53:19 -0400
Received: from [140.186.70.92] (port=47542 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1P3o69-0001sw-Kk
	for bug-gnu-emacs@HIDDEN; Thu, 07 Oct 2010 06:53:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <yamato@HIDDEN>) id 1P3o67-0001mL-RD
	for bug-gnu-emacs@HIDDEN; Thu, 07 Oct 2010 06:53:17 -0400
Received: from mx1.redhat.com ([209.132.183.28]:16304)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <yamato@HIDDEN>) id 1P3o67-0001ld-Kb
	for bug-gnu-emacs@HIDDEN; Thu, 07 Oct 2010 06:53:15 -0400
Received: from int-mx03.intmail.prod.int.phx2.redhat.com
	(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16])
	by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o97ArDpY020588
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <bug-gnu-emacs@HIDDEN>; Thu, 7 Oct 2010 06:53:14 -0400
Received: from localhost (beach.nrt.redhat.com [10.64.200.71])
	by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id o97ArC6l004891
	for <bug-gnu-emacs@HIDDEN>; Thu, 7 Oct 2010 06:53:12 -0400
Date: Thu, 07 Oct 2010 19:53:11 +0900 (JST)
Message-Id: <20101007.195311.697425208822821860.yamato@HIDDEN>
From: Masatake YAMATO <yamato@HIDDEN>
Organization: Red Hat Japan, Inc.
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Spam-Score: -6.3 (------)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
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: -6.3 (------)

When I tried to open a file under monotone version control system,
emacs reports an error because vc-mtn-workfile-branch in
vc-mtn-mode-line-string retruns nil.



Backtrace
------------------------------------------------------------------------
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("\\`[^:/#]*[:/#]" nil)
  (if (string-match (car rule) branch) (setq branch (replace-match (cdr rule) t nil branch)))
  (while --cl-dolist-temp-- (setq rule (car --cl-dolist-temp--)) (if (string-match (car rule) branch) (setq branch (replace-match (cdr rule) t nil branch))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
  (let ((--cl-dolist-temp-- vc-mtn-mode-line-rewrite) rule) (while --cl-dolist-temp-- (setq rule (car --cl-dolist-temp--)) (if (string-match (car rule) branch) (setq branch (replace-match (cdr rule) t nil branch))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) nil)
  (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- vc-mtn-mode-line-rewrite) rule) (while --cl-dolist-temp-- (setq rule (car --cl-dolist-temp--)) (if (string-match (car rule) branch) (setq branch (replace-match (cdr rule) t nil branch))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) nil))
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- vc-mtn-mode-line-rewrite) rule) (while --cl-dolist-temp-- (setq rule (car --cl-dolist-temp--)) (if (string-match (car rule) branch) (setq branch (replace-match (cdr rule) t nil branch))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) nil)))
  (block nil (let ((--cl-dolist-temp-- vc-mtn-mode-line-rewrite) rule) (while --cl-dolist-temp-- (setq rule (car --cl-dolist-temp--)) (if (string-match (car rule) branch) (setq branch (replace-match (cdr rule) t nil branch))) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) nil))
  (dolist (rule vc-mtn-mode-line-rewrite) (if (string-match (car rule) branch) (setq branch (replace-match (cdr rule) t nil branch))))
  (let ((branch (vc-mtn-workfile-branch file))) (dolist (rule vc-mtn-mode-line-rewrite) (if (string-match (car rule) branch) (setq branch (replace-match (cdr rule) t nil branch)))) (format "Mtn%c%s" (case (vc-state file) ((up-to-date needs-update) 45) (added 64) (t 58)) branch))
  vc-mtn-mode-line-string("/tmp/net.venge.monotone/AUTHORS")
  apply(vc-mtn-mode-line-string "/tmp/net.venge.monotone/AUTHORS")
  vc-call-backend(Mtn mode-line-string "/tmp/net.venge.monotone/AUTHORS")
  vc-mode-line("/tmp/net.venge.monotone/AUTHORS" Mtn)
  vc-find-file-hook()
  run-hooks(find-file-hook)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer AUTHORS> "/tmp/net.venge.monotone/AUTHORS" nil nil "/tmp/net.venge.monotone/AUTHORS" (1205380 64768))
  find-file-noselect("/tmp/net.venge.monotone/AUTHORS" nil nil t)
  find-file("/tmp/net.venge.monotone/AUTHORS" t)
  call-interactively(find-file nil nil)
------------------------------------------------------------------------



Software version
------------------------------------------------------------------------
GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) of 2010-10-07 on dhcp-193-209.nrt.redhat.com

mtn --version
monotone 0.48 (base revision: 844268c137aaa783aa800a9c16ae61edda80ecea)
------------------------------------------------------------------------

How to reproduce
------------------------------------------------------------------------
1. Prepare  source code under monotone vcs

   cd /tmp
   mtn clone monotone://code.monotone.ca/monotone net.venge.monotone
   ...

2. open a source code with \C-x\C-f

   \C-x\C-f
   Find file: /tmp/net.venge.monotone/AUTHORS

   You will got
   if: Wrong type argument: stringp, nil at *Message*
------------------------------------------------------------------------


My analysis
------------------------------------------------------------------------
An regular expression,  "Current branch: \\(.*\\)\nChanges against parent \\(.*\\)"
in  `vc-mtn-workfile-branch' doesn't match to the output of mtn status:

   $ cd /tmp/net.venge.monotone
   $ mtn status at /tmp/net.venge.monotone
   ----------------------------------------------------------------------
   Revision: 40f634fe2e8124dfa567a2ca805824dcfaf6f2c2
   Parent:   e50b098f9f507bd83207365c7893058fbd01635a
   Author:   ???
   Date:     10/07/2010 07:48:45 PM
   Branch:   net.venge.monotone

   Changes against parent e50b098f9f507bd83207365c7893058fbd01635a

   no changes

No "Current branch: ..." line is found.

I propose following patch but I'm not sure this patch is correct or
not because I'm too new to monotone.

2010-10-07  Masatake YAMATO  <yamato@HIDDEN>

	* vc/vc-mtn.el (vc-mtn-working-revision): Use an empty
	string as the result of 'vc-mtn-working-revision'
	if it returns nil.


=== modified file 'lisp/vc/vc-mtn.el'
*** lisp/vc/vc-mtn.el	2010-08-29 16:17:13 +0000
--- lisp/vc/vc-mtn.el	2010-10-07 10:35:52 +0000
***************
*** 156,162 ****
  
  (defun vc-mtn-mode-line-string (file)
    "Return string for placement in modeline by `vc-mode-line' for FILE."
!   (let ((branch (vc-mtn-workfile-branch file)))
      (dolist (rule vc-mtn-mode-line-rewrite)
        (if (string-match (car rule) branch)
  	  (setq branch (replace-match (cdr rule) t nil branch))))
--- 156,162 ----
  
  (defun vc-mtn-mode-line-string (file)
    "Return string for placement in modeline by `vc-mode-line' for FILE."
!   (let ((branch (or (vc-mtn-workfile-branch file) "")))
      (dolist (rule vc-mtn-mode-line-rewrite)
        (if (string-match (car rule) branch)
  	  (setq branch (replace-match (cdr rule) t nil branch))))



Masatake YAMATO




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Masatake YAMATO <yamato@HIDDEN>
Subject: bug#7171: Acknowledgement (error	at vc-mtn-mode-line-string of
 vc-mtn.el)
Message-ID: <handler.7171.B.128644861023202.ack <at> debbugs.gnu.org>
References: <20101007.195311.697425208822821860.yamato@HIDDEN>
X-Gnu-PR-Message: ack 7171
X-Gnu-PR-Package: emacs
Reply-To: 7171 <at> debbugs.gnu.org
Date: Thu, 07 Oct 2010 10:51:02 +0000

Thank you for filing a new bug report with GNU.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 7171 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
7171: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D7171
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


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


Received: (at control) by debbugs.gnu.org; 1 Dec 2012 02:30:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 30 21:30:24 2012
Received: from localhost ([127.0.0.1]:47722 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TecqW-0008UH-2E
	for submit <at> debbugs.gnu.org; Fri, 30 Nov 2012 21:30:24 -0500
Received: from fencepost.gnu.org ([208.118.235.10]:46826)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rgm@HIDDEN>) id 1TecqU-0008R2-0E
	for control <at> debbugs.gnu.org; Fri, 30 Nov 2012 21:30:22 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rgm@HIDDEN>) id 1TecoP-0003b3-14
	for control <at> debbugs.gnu.org; Fri, 30 Nov 2012 21:28:13 -0500
Date: Fri, 30 Nov 2012 21:28:13 -0500
Message-Id: <E1TecoP-0003b3-14@HIDDEN>
Subject: control message for bug 7171
To: <control <at> debbugs.gnu.org>
X-Mailer: mail (GNU Mailutils 2.1)
From: Glenn Morris <rgm@HIDDEN>
X-Spam-Score: -4.6 (----)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
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/cgi-bin/mailman/private/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: -4.6 (----)

merge 6513 7171




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


Received: (at control) by debbugs.gnu.org; 20 Feb 2013 04:58:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 23:58:15 2013
Received: from localhost ([127.0.0.1]:38251 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U81l1-0001uy-GJ
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 23:58:15 -0500
Received: from fencepost.gnu.org ([208.118.235.10]:46874)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rgm@HIDDEN>) id 1U81kw-0001up-Kp
	for control <at> debbugs.gnu.org; Tue, 19 Feb 2013 23:58:11 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rgm@HIDDEN>) id 1U81jp-0003tX-Cm
	for control <at> debbugs.gnu.org; Tue, 19 Feb 2013 23:57:01 -0500
Date: Tue, 19 Feb 2013 23:57:01 -0500
Message-Id: <E1U81jp-0003tX-Cm@HIDDEN>
Subject: control message for bug 6513
To: <control <at> debbugs.gnu.org>
X-Mailer: mail (GNU Mailutils 2.1)
From: Glenn Morris <rgm@HIDDEN>
X-Spam-Score: -4.8 (----)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
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/cgi-bin/mailman/private/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: -4.8 (----)

retitle 6513 vc-mtn to use "mtn automate"





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.