tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tramp advises vc-workfile-unchanged-p, how to remove?


From: Andre Spiegel
Subject: Re: Tramp advises vc-workfile-unchanged-p, how to remove?
Date: Sun, 27 Mar 2005 15:16:05 +0200

On Sun, 2005-03-27 at 14:54 +0200, Kai Großjohann wrote:

> I've taken a look at the advice of vc-workfile-unchanged-p.  It seems
> to me that it was originally introduced because VC looked at the
> modification timestamps of the files involed.  Did VC do that in
> earlier releases, Andre?
> 
> Now, it seems that the workfile-unchanged-p operation is implemented
> by invoking diff.  The default implementation should thus work more or
> less out of the box for Tramp, as well.

VC still does both: It does a diff, and if the diff says "no
differences", then VC remembers the time stamp of the file so that it
need not diff the file again unless the time stamp changes.  This is
implemented in vc-workfile-unchanged-p in vc-hooks.el.  The timestamp
stuff is generic in this function, but it delegates to
vc-BACKEND-workfile-unchanged-p to do the actual diff.  The default
implementation of this, vc-default-workfile-unchanged-p, is included in
vc-hooks.el, right below the generic vc-workfile-unchanged-p.

For RCS, this function (only vc-default-workfile-unchanged-p) is
overridden by vc-rcs-workfile-unchanged-p, which includes the --brief
logic you refer to.

I'm not sure how this interplays with Tramp, but perhaps this
description can help you to sort it out.  In short: yes, the timestamp
stuff is still there and is needed.  Is there a way to make it work over
Tramp?  Or should there be a way to disable it for the Tramp case?

> The only exception to this is the RCS implementation.  It queries the
> underlying RCS installation whether it groks "--brief".  Invoking RCS
> remotely may refer to different RCS installations, so that we have to
> remember different values for the "groks --brief" flag.
> 
> My suggestion is to augment tramp-vc-setup-for-remote to make
> vc-rcsdiff-knows-brief a buffer-local variable.  This was already done
> for vc-rcs-release.

There's nothing against that in principle, I'd say.  However, you might
also try and set vc-rcsdiff-knows-brief to "no" unconditionally when it
goes via Tramp, just to avoid the double-take logic altogether.

Hope this helps,
Andre






reply via email to

[Prev in Thread] Current Thread [Next in Thread]