all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* AW: AW: behavior of vc-recompute-state in combinationwithvc-cvs-stay-local is t
@ 2004-11-30 12:21 klaus.berndl
  2004-11-30 12:44 ` Andre Spiegel
  0 siblings, 1 reply; 2+ messages in thread
From: klaus.berndl @ 2004-11-30 12:21 UTC (permalink / raw)
  Cc: monnier, emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 1154 bytes --]

>> 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?

>For a local repository, VC does indeed call "cvs status" in
>vc-recompute-state, even if vc-cvs-stay-local is t.  This setting only
>affects remote repositories.

ah, now i understand - hmm, had just a look at the docstring of
this variable - hmm, who has eyes for reading has a big advantage ;-)


>> 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???

>Function vc-state uses a cached value of the vc-state property (via
>vc-file-getprop).  This value gets recomputed in the course of
>revert-buffer, which is a sensible thing to do, I would think?

Yes, seems to be sensible... but how is this done - i took a look
at after-revert-hook, but no special entry for vc - so how VC ensures
that the cached value is recomputed by revert-buffer?




[-- Attachment #1.2: Type: text/html, Size: 1763 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: AW: AW: behavior of vc-recompute-state in combinationwithvc-cvs-stay-local is t
  2004-11-30 12:21 AW: AW: behavior of vc-recompute-state in combinationwithvc-cvs-stay-local is t klaus.berndl
@ 2004-11-30 12:44 ` Andre Spiegel
  0 siblings, 0 replies; 2+ messages in thread
From: Andre Spiegel @ 2004-11-30 12:44 UTC (permalink / raw)
  Cc: Stefan Monnier, emacs-devel

On Tue, 2004-11-30 at 13:21 +0100, klaus.berndl@sdm.de wrote:

> >Function vc-state uses a cached value of the vc-state property (via
> >vc-file-getprop).  This value gets recomputed in the course of
> >revert-buffer, which is a sensible thing to do, I would think?
> 
> Yes, seems to be sensible... but how is this done - i took a look
> at after-revert-hook, but no special entry for vc - so how VC ensures
> that the cached value is recomputed by revert-buffer?

It happens in vc-find-file-hook, which clears all the properties.  Also,
when finding a CVS-controlled file, that immediately yields the new
value for vc-state, from CVS/Entries.

Aside: Please don't use HTML formatting when writing to emacs-devel.
Also, questions such as this are perhaps better discussed in personal
e-mail, since this is really just about understanding what the current
code does.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-30 12:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-30 12:21 AW: AW: behavior of vc-recompute-state in combinationwithvc-cvs-stay-local is t klaus.berndl
2004-11-30 12:44 ` Andre Spiegel

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.