emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: tramp sudo:: and version control on RCS root control


From: Andre Spiegel
Subject: Re: address@hidden: tramp sudo:: and version control on RCS root controlled files]
Date: Sat, 19 Nov 2005 12:17:04 +0100

On Sat, 2005-11-05 at 18:43 -0500, Richard Stallman wrote:

> [I sent this message three times but my system did not see
> a response.  Did you deal with this?]

Sorry for the delayed response.  This is actually a more fundamental
issue and I'm not sure how to proceed with this.

Here is the problem statement:

> When I want to modify a file owned by root and RCS controlled through the
> tramp sudo:: method, Emacs think it does not have to do the check out and
> triggers a steal-the-lock procedure.

The problem is that VC needs to compare the name of the user holding the
lock on a file to the name of the user that is running Emacs.  (The RCS
master file only contains the name of the locking user, no UID.)  VC
normally compares the name to user-login-name, but this is not correct
when Tramp is involved, because the account at the end of the Tramp
connection might be a different one (not just under the sudo:: method,
other methods can also exhibit this behaviour).

The only solution I can think of would be to have a new
file-handler-sensitive operation (file-login-name FILE) which returns
the name of the user under which Emacs accesses the given FILE.  For
local files, that would be equivalent to user-login-name, for remote
files it would be the name of the remote user, or "root" if Tramp sudo::
is involved.

What do you think?






reply via email to

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