Enter your bug report in this message, including as much detail as you
possibly can about the problem, what you did to cause it and what the
local and remote machines are.

If you can give a simple set of instructions to make this bug happen
reliably, please include those.  Thank you for helping kill bugs in
TRAMP.
--bug report follows this line--

Initial (failed) checkin to SCCS of a remote file resulted in remote file being 
deleted and localthe associated tramp buffer too!

An empty SCCS subdirectory existed where the file resided.  I attempted to place the 
file under SCCS with C-x v v (vc-next-action).  

Basically, the admin command was passed -i/r@METHOD:HOST:/PATH/TO/FILE/ where -iFILE 
would suffice.  Compounding the problem, the error wasn't noticed and the file and 
buffer destroyed.

Here's a lightly edited excerpt from the *debug* tramp/scpx HOST* buffer (my line 
numbering):

[...]
[1]$ ls -d /export/home/www/webhosting.pncbank.com/docs/index.html ; echo 
tramp_exit_status $?
/export/home/www/webhosting.pncbank.com/docs/index.html
tramp_exit_status 0
[2]$ tramp_file_attributes /export/home/www/webhosting.pncbank.com/docs/index.html
(nil 1 6730 100 (15039 52120) (15039 52157) (15039 52157) 7821 33277 t (0 . 6987) (440 
9))
[3]$ ls -d /www/webhosting.pncbank.com/docs/SCCS ; echo tramp_exit_status $?
/www/webhosting.pncbank.com/docs/SCCS
tramp_exit_status 0
[4]$ cd /www/webhosting.pncbank.com/docs/ ; echo tramp_exit_status $?
tramp_exit_status 0
[5]$ admin -r1.1 -fb -i/r\@scpx\:weblog1\:/www/webhosting.pncbank.com/docs/index.html 
-y /r\@scpx\:weblog1\:/www/webhosting.pncbank.com/docs/SCCS/s.index.html; 
tramp_old_status=$?
ERROR [/r@scpx:weblog1:/www/webhosting.pncbank.com/docs/SCCS/s.index.html]: cannot 
create lock file (cm4)
[6]$ tramp_set_exit_status $tramp_old_status; echo tramp_exit_status $?
tramp_exit_status 1
[7]$ echo $?
0
[8]$ rm -f /www/webhosting.pncbank.com/docs/index.html ; echo ok
ok
[9]$ ls -d /www/webhosting.pncbank.com/docs/RCS/index.html\,v ; echo tramp_exit_status 
$?
/www/webhosting.pncbank.com/docs/RCS/index.html,v: No such file or directory
tramp_exit_status 2
[10]$ ls -d /www/webhosting.pncbank.com/docs/index.html\,v ; echo tramp_exit_status $?
/www/webhosting.pncbank.com/docs/index.html,v: No such file or directory
tramp_exit_status 2
[11]$ ls -d /www/webhosting.pncbank.com/docs/RCS/index.html ; echo tramp_exit_status $?
/www/webhosting.pncbank.com/docs/RCS/index.html: No such file or directory
tramp_exit_status 2
[12]$ ls -d /www/webhosting.pncbank.com/docs/SCCS/s.index.html ; echo 
tramp_exit_status $?
/www/webhosting.pncbank.com/docs/SCCS/s.index.html: No such file or directory
tramp_exit_status 2
[13]$ ls -d /www/webhosting.pncbank.com/docs/s.index.html ; echo tramp_exit_status $?
/www/webhosting.pncbank.com/docs/s.index.html: No such file or directory
tramp_exit_status 2
[14]$ ( cd /www/webhosting.pncbank.com/docs/CVS ; echo tramp_exit_status $? )
/bin/ksh: /www/webhosting.pncbank.com/docs/CVS:  not found
tramp_exit_status 1
[15]$ cd /www/webhosting.pncbank.com/docs/ ; echo tramp_exit_status $?
tramp_exit_status 0
[16]$ get; tramp_old_status=$?
ERROR: missing file arg (cm3)
[17]$ tramp_set_exit_status $tramp_old_status; echo tramp_exit_status $?
tramp_exit_status 1
[18]$ echo $?
0
[19]$ ls -d /www/webhosting.pncbank.com/docs/index.html ; echo tramp_exit_status $?
/www/webhosting.pncbank.com/docs/index.html: No such file or directory
tramp_exit_status 2
# Inserting directory `ls -al /r@scpx:weblog1:/www/webhosting.pncbank.com/docs/', 
wildcard no, fulldir yes
[20]$ /bin/ls -al /www/webhosting.pncbank.com/docs/
[...]

A few observations:

1) The admin command at line [5] was improperly constructed with the
-i option being passed a filename still in remote syntax.

2) The error code was noted on line [6]

This is where it begans to unravel.  I'd be happy for VC or tramp
(who's in charge at this point in the sequence?) to simply fail.

3) Line [7] is where evil doings begin: Who (tramp or VC?) put that
   2nd echo $? in there?  Did tramp confuse VC by turning $? from 1 to
   0?  Maybe tramp_set_exit_status need return $? in addition to
   encoding it???

Since the error at [5] was masked by combination of [6-7], line[8]
happily and 'safely' removes the original file.  Right around this
time, the emacs buffer is 'safely' discarded as well in preparation
for reading the file back from SCCS where it is presumed now to be
stored.

4) Skip ahead to the sequence at lines [16-18] and you see the same
   pattern: A failed VC command (note the missing filename!), followed
   by tramp_set_exit_status duly noting the failure but causing $? to
   be cleared.

I'll be a little wary of remote VC until we get a resolution.  I
couldn't be happier with the basic function provided by tramp itself.
Many thanks to the development community!!!

Kim

mailto:[EMAIL PROTECTED]

Emacs  : GNU Emacs 20.3.1 (sparc-sun-solaris2.6, X toolkit)
 of Thu Aug 27 1998 on tensor.vnet.net
Package: tramp ($Id: tramp.el,v 2.0.2.2 2001/03/03 00:06:34 grossjoh Exp $)

current state:
==============
(setq
 tramp-ls-command nil
 tramp-test-groks-nt nil
 tramp-file-exists-command nil
 tramp-current-method nil
 tramp-current-user nil
 tramp-current-host nil
 tramp-auto-save-directory nil
 tramp-default-method "scpx"
 tramp-rsh-end-of-line "\n"
 tramp-remote-path '("/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin"
                     "/usr/ccs/bin" "/local/bin" "/local/freeware/bin"
                     "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin")
 tramp-login-prompt-regexp ".*ogin: *$"
 tramp-password-prompt-regexp "^.*\\([pP]assword\\|passphrase.*\\):
 tramp-wrong-passwd-regexp "^.*\\(Permission denied.\\|Login [Ii]ncorrect\\|Received 
signal [0-9]+\\|Connection \\(refused\\|closed\\)\\|Sorry, try again.\\|Name or 
service not known\\).*$"
 tramp-temp-name-prefix "tramp."
 tramp-file-name-structure 
'("\\`/r\\(@\\([a-z0-9]+\\)\\)?:\\(\\([-a-z0-9_#]+\\)@\\)?\\([-a-z0-9.]+\\):\\(.*\\)\\'"
 2 4 5 6)
 tramp-file-name-regexp "\\`/r[@:]"
 tramp-make-tramp-file-format "/r@%m:%u@%h:%p"
 tramp-end-of-output "/////"
 shell-prompt-pattern "^[^#$%>\n]*[#$%>] *"
 backup-by-copying nil
 backup-by-copying-when-linked nil
 backup-by-copying-when-mismatch nil
 )

Reply via email to