From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: AW: behavior of vc-recompute-state in combination withvc-cvs-stay-local is t Date: Tue, 30 Nov 2004 12:21:55 +0100 Message-ID: <1B3ACCFD5694A94DBA4E231402B0E9ED9DD6E7@mucmail1.sdm.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0453201999==" X-Trace: sea.gmane.org 1101813970 18965 80.91.229.6 (30 Nov 2004 11:26:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Nov 2004 11:26:10 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 30 12:25:47 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CZ68g-0006m1-00 for ; Tue, 30 Nov 2004 12:25:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZ6I7-0001aC-BU for ged-emacs-devel@m.gmane.org; Tue, 30 Nov 2004 06:35:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CZ6El-0001BI-0s for emacs-devel@gnu.org; Tue, 30 Nov 2004 06:32:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CZ6Ej-0001An-G7 for emacs-devel@gnu.org; Tue, 30 Nov 2004 06:32:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZ6Ei-0001AO-OT for emacs-devel@gnu.org; Tue, 30 Nov 2004 06:32:01 -0500 Original-Received: from [192.76.162.229] (helo=world1.sdm.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CZ650-0004M2-Ap; Tue, 30 Nov 2004 06:21:59 -0500 Original-Received: from localhost ([127.0.0.1] helo=world1.sdm.de) by world1.sdm.de (MTA) via esmtp id 1CZ64y-00065b-U6; Tue, 30 Nov 2004 12:21:56 +0100 Original-Received: from mucns1.muc.sdm.de ([193.102.180.22]) by world1.sdm.de (MTA) via esmtp id 1CZ64y-00065V-Lg; Tue, 30 Nov 2004 12:21:56 +0100 Original-Received: by mucns1.muc.sdm.de (MTA) via esmtp from localhost ([127.0.0.1] helo=sdmmail1.sdm.de) id 1CZ64y-0000Cm-K6; Tue, 30 Nov 2004 12:21:56 +0100 Original-Received: from mucmail1.sdm.de ([193.102.180.175]) by sdmmail1.sdm.de with Microsoft SMTPSVC(6.0.3790.0); Tue, 30 Nov 2004 12:21:55 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: behavior of vc-recompute-state in combination withvc-cvs-stay-local is t Thread-Index: AcTWzQ55K2+SLOLIQx6iXqGazLuAzwAAL0c7 Original-To: X-OriginalArrivalTime: 30 Nov 2004 11:21:55.0899 (UTC) FILETIME=[CCB138B0:01C4D6CE] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:30527 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30527 This is a multi-part message in MIME format. --===============0453201999== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4D6CE.CC7D17F0" This is a multi-part message in MIME format. ------_=_NextPart_001_01C4D6CE.CC7D17F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Mon, 2004-11-29 at 17:31 +0100, klaus.berndl@sdm.de wrote: >> 4. Running (vc-recompute-state = "/a/file/under/remote-repository-CVS/file.txt") >> =3D=3D> returns always nil, because the state-binding in the = vc-cvs-state is >> always nil for that file. >The code was simply based on the assumption that vc-recompute-state >would only be called for files that are already visited. In this case, >vc-state can never be nil because we compute it at visiting time >already. ah, i had already a suspicion like that.... But what i still do not understand, why vc-recompute-state behaves different related if the repository is local or remote 8at least this is the only difference i can imagine between the two testcases - see my first postin, steps 4 and 3? >I've changed this now and moved vc-recompute-state into vc-hooks.el. = It >should always return a valid state now. ah, this sounds wonderful! IMHO this would be a very good enhencement for tools like ECB which want to display a VC-state also for file not already visited... Thanks, Andre! May i ask another problem/question related to `vc-state'? Please see the following very simple and fast testable scenario: 1. load a file (lets say the filename is XXX.txt) into Emacs, which is under control of CVS 2. do some editing changes and save it - do not kill the buffer 3. M-: (vc-state "XXX.txt") RET =3D=3D> return 'edited for me 4. No checkin this file but not from within Emacs, so e.g. via bash = command line 5. M-: (vc-state "XXX.txt") RET =3D=3D> returns again 'edited (but currently 'up-to-date would be correct) 6. Call M-x revert-buffer 7. Again M-: (vc-state "XXX.txt") RET =3D=3D> Now vc-state returns the = correct 'up-to-date state So, which mysterious things are done by revert-buffer so *after* it = vc-state returns correct 'up-to-date state but wrong 'edited state if called *before* the = revert-buffer??? Thanks again, Klaus ------_=_NextPart_001_01C4D6CE.CC7D17F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable AW: behavior of vc-recompute-state in combination = withvc-cvs-stay-local is t

On Mon, 2004-11-29 at 17:31 +0100, klaus.berndl@sdm.de = wrote:

>> 4. Running (vc-recompute-state = "/a/file/under/remote-repository-CVS/file.txt")
>>    =3D=3D> returns always nil, because the = state-binding in the vc-cvs-state is
>>        always nil for that = file.

>The code was simply based on the assumption that = vc-recompute-state
>would only be called for files that are already visited.  In = this case,
>vc-state can never be nil because we compute it at visiting time
>already.

ah, i had already a suspicion like that....
But what i still do not understand, why vc-recompute-state behaves
different related if the repository is local or remote 8at least = this
is the only difference i can imagine between the two testcases - see
my first postin, steps 4 and 3?

>I've changed this now and moved vc-recompute-state into = vc-hooks.el.  It
>should always return a valid state now.

ah, this sounds wonderful! IMHO this would be a very good = enhencement
for tools like ECB which want to display a VC-state also for file
not already visited... Thanks, Andre!

May i ask another problem/question related to `vc-state'? Please see
the following very simple and fast testable scenario:

1. load a file (lets say the filename is XXX.txt) into Emacs, which = is
   under control of CVS
2. do some editing changes and save it - do not kill the buffer
3. M-: (vc-state "XXX.txt") RET =3D=3D> return 'edited for = me
4. No checkin this file but not from within Emacs, so e.g. via bash = command line
5. M-: (vc-state "XXX.txt") RET =3D=3D> returns again = 'edited
   (but currently 'up-to-date would be correct)
6. Call M-x revert-buffer
7. Again M-: (vc-state "XXX.txt") RET =3D=3D> Now vc-state = returns the correct
   'up-to-date state

So, which mysterious things are done by revert-buffer so *after* it = vc-state returns
correct 'up-to-date state but wrong 'edited state if called *before* = the
revert-buffer???

Thanks again,
Klaus

------_=_NextPart_001_01C4D6CE.CC7D17F0-- --===============0453201999== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============0453201999==--