From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Guru Gandharv" Newsgroups: gmane.emacs.bugs Subject: bug in vc-state functions in Emacs v 22.1 Date: Tue, 2 Oct 2007 15:31:31 -0400 Message-ID: <9bd2512a0710021231y60941059uea06c07792af2acb@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_17733_22620424.1191353491870" X-Trace: sea.gmane.org 1191361586 13242 80.91.229.12 (2 Oct 2007 21:46:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Oct 2007 21:46:26 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 02 23:46:20 2007 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.50) id 1IcpZE-00057d-CS for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Oct 2007 23:46:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IcpZA-0003Ft-EY for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Oct 2007 17:46:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IcnSy-0003xR-Rd for bug-gnu-emacs@gnu.org; Tue, 02 Oct 2007 15:31:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IcnSx-0003wS-TE for bug-gnu-emacs@gnu.org; Tue, 02 Oct 2007 15:31:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IcnSx-0003wK-OJ for bug-gnu-emacs@gnu.org; Tue, 02 Oct 2007 15:31:35 -0400 Original-Received: from ug-out-1314.google.com ([66.249.92.168]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IcnSx-0006pB-4n for bug-gnu-emacs@gnu.org; Tue, 02 Oct 2007 15:31:35 -0400 Original-Received: by ug-out-1314.google.com with SMTP id m4so2592152uge for ; Tue, 02 Oct 2007 12:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=BfiJxZJHM/B++ZT3T79Kq349pkNNna8RGbNvRYovm5Q=; b=ka+sPk9fjgyIpK4/6s9h1z/iLGZel4lpDDlwbL8YhV56HTe9Um5hDJLzRwEMRI27mkCvurq+E4/Q87fcVclNViLiVxOMTPT2ek2ghHTsnP8N9Wv63dD86F/uNdxfgsxZA5NG20m8zQETY+PvOJJWZc0QSzbSgPYL8QdQ9pzs6Us= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=g/bQfKzl382S7VYWk+S+piXnRnO7gH70EgHauQ2XOla+yvV+0AvskgTvQ8UnztZhEfKBSinQ7sZG3rxsU46+JvSe97GNHi0r4vfFBuTfZQC59lHSwsDmxBvJ0bgqNTSb1szXNjkJZgRUXqjRChUYuFQKoGz12YJZ8Vmpziqy4cc= Original-Received: by 10.78.21.7 with SMTP id 7mr4976264huu.1191353491879; Tue, 02 Oct 2007 12:31:31 -0700 (PDT) Original-Received: by 10.78.130.9 with HTTP; Tue, 2 Oct 2007 12:31:31 -0700 (PDT) X-Detected-Kernel: Linux 2.6 (newer, 2) X-Mailman-Approved-At: Tue, 02 Oct 2007 17:45:58 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:16693 Archived-At: ------=_Part_17733_22620424.1191353491870 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline In batch mode vc related commands doesn't work as expected. In editor mode it partially works, if we do a vc--state before we do vc-state it gives correct state and a 'vc-recompute-state' gives correct state in any order. I verified the latest Emacs CVS source and the behavior is still same. It works fine with vc version shipped with Emacs v21.3. *Problem *Illustration: $ cvs status myfile.sh|grep Status File: myfile.sh Status: Needs Patch $ $ cat get-vc-state.el (require 'vc-cvs) (require 'vc) (message "%s" (emacs-version)) (if (> emacs-major-version 21) (message "%s" (vc-recompute-state "/tmp/myfile.sh")) (message "%s" (vc-state "/tmp/myfile.sh"))) (message "%s" (vc-cvs-state "/tmp/myfile.sh")) (message "%s" (vc-state "/tmp/myfile.sh")) $ $ emacs-22.1 -batch -l get-vc-state.el GNU Emacs 22.1.1 (i386-pc-solaris2.10, GTK+ Version 2.4.9) of 2007-09-27 on sx86qa3.nyc.deshaw.com up-to-date up-to-date up-to-date $ emacs-21.3 -batch -l get-vc-state.el GNU Emacs 21.3.1 (i386-pc-solaris2.10, Motif Version 2.1.0) of 2005-05-14 on sx86qa1.nyc.deshaw.com up-to-date needs-patch needs-patch $ ------=_Part_17733_22620424.1191353491870 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
In batch mode vc related commands doesn't work as expected. In editor mode it partially works, if we do a vc-<backend>-state before we do vc-state it gives correct state and a 'vc-recompute-state' gives correct state in any order.
I verified the latest Emacs CVS source and the behavior is still same. It works fine with vc version shipped with Emacs v21.3.
 
 
$ cvs status myfile.sh|grep Status
File: myfile.sh           Status: Needs Patch
$
 
$ cat get-vc-state.el
(require 'vc-cvs)
(require 'vc)
(message "%s" (emacs-version))
(if (> emacs-major-version 21)
    (message "%s" (vc-recompute-state "/tmp/myfile.sh"))
    (message "%s" (vc-state "/tmp/myfile.sh")))
(message "%s" (vc-cvs-state "/tmp/myfile.sh"))
(message "%s" (vc-state "/tmp/myfile.sh"))
$
 
------=_Part_17733_22620424.1191353491870--