all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Tramp keep-time broken
@ 2003-02-11 21:11 Lars Hansen
  2003-02-12  7:52 ` Kai Großjohann
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Hansen @ 2003-02-11 21:11 UTC (permalink / raw)
  Cc: emacs-devel

`copy-file' does not keep time although KEEP-TIME is t when one copies a 
file from the local computer to a remote one using Emacs Tramp from 
today's CVS.
When I look into tramp.el it seems that copying is handled by 
`tramp-do-copy-or-rename-via-buffer' and that this function does not 
support KEEP-TIME. It seems that `tramp-rcp-program' is not used at all!
Is this true?

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

* Re: Tramp keep-time broken
  2003-02-11 21:11 Tramp keep-time broken Lars Hansen
@ 2003-02-12  7:52 ` Kai Großjohann
  2003-02-12 11:18   ` Lars Hansen
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Großjohann @ 2003-02-12  7:52 UTC (permalink / raw)
  Cc: emacs-devel

Lars Hansen <larsh@math.ku.dk> writes:

> `copy-file' does not keep time although KEEP-TIME is t when one copies
> a file from the local computer to a remote one using Emacs Tramp from
> today's CVS.
> When I look into tramp.el it seems that copying is handled by
> tramp-do-copy-or-rename-via-buffer' and that this function does not
> support KEEP-TIME. It seems that `tramp-rcp-program' is not used at
> all!
> Is this true?

It depends on the tramp method that you are using.  There are inline
methods (which transfer the file through the shell connection using
base64 or uu encoding) and there are out-of-band methods (which
invoke an external program such as rcp or scp or rsync to actually
transfer the file).

Should Tramp barf if it is requested to keep the time but can't?

Is there a way to set the mtime of a file that's created by
redirecting a program's stdout to a file?  Maybe some machines have a
"touch" program that can set the mtime to an arbitrary value.
-- 
A turnip curses Elvis

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

* Re: Tramp keep-time broken
  2003-02-12  7:52 ` Kai Großjohann
@ 2003-02-12 11:18   ` Lars Hansen
  2003-02-12 11:55     ` Kai Großjohann
  2003-02-12 18:11     ` Kai Großjohann
  0 siblings, 2 replies; 5+ messages in thread
From: Lars Hansen @ 2003-02-12 11:18 UTC (permalink / raw)
  Cc: emacs-devel

Kai Großjohann wrote:

>It depends on the tramp method that you are using.  There are inline
>methods (which transfer the file through the shell connection using
>base64 or uu encoding) and there are out-of-band methods (which
>invoke an external program such as rcp or scp or rsync to actually
>transfer the file).
>  
>
I am using methods pscp under Windows and scp under GNU/Linux. The time 
stamp is not preserved in any of the cases. Unless I read the code in 
tramp.el in a wrong way, time stamp is never preserved when copying 
across machines. It looks to me as a bug.

>Should Tramp barf if it is requested to keep the time but can't?
>  
>
Tramp actually gives a warning, I just did not see it since one have to 
look in the message buffer. When i call

(copy-file "~/tmp/junk" "/larsh@galois.math.ku.dk:tmp/keep" t t)
(copy-file "~/tmp/junk" "/larsh@galois.math.ku.dk:tmp/new" t nil)

I get

tramp: Warning: cannot preserve file time stamp with inline copying 
across machines
tramp: Writing tmp file using `pscp'...
tramp: Transferring file using `pscp'...done
Wrote /larsh@galois.math.ku.dk:/home/l/larsh/tmp/keep
tramp: Writing tmp file using `pscp'...
tramp: Transferring file using `pscp'...done
Wrote /larsh@galois.math.ku.dk:/home/l/larsh/tmp/new

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

* Re: Tramp keep-time broken
  2003-02-12 11:18   ` Lars Hansen
@ 2003-02-12 11:55     ` Kai Großjohann
  2003-02-12 18:11     ` Kai Großjohann
  1 sibling, 0 replies; 5+ messages in thread
From: Kai Großjohann @ 2003-02-12 11:55 UTC (permalink / raw)
  Cc: emacs-devel

Lars Hansen <larsh@math.ku.dk> writes:

> tramp: Warning: cannot preserve file time stamp with inline copying
> across machines

Gah?  That must be a bug -- pscp is not an inline method.
I'll investigate.
-- 
A turnip curses Elvis

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

* Re: Tramp keep-time broken
  2003-02-12 11:18   ` Lars Hansen
  2003-02-12 11:55     ` Kai Großjohann
@ 2003-02-12 18:11     ` Kai Großjohann
  1 sibling, 0 replies; 5+ messages in thread
From: Kai Großjohann @ 2003-02-12 18:11 UTC (permalink / raw)


Lars Hansen <larsh@math.ku.dk> writes:

> I am using methods pscp under Windows and scp under GNU/Linux. The
> time stamp is not preserved in any of the cases. Unless I read the
> code in tramp.el in a wrong way, time stamp is never preserved when
> copying across machines. It looks to me as a bug.

Ah, I've had a look at the code.  Indeed, it should be invoking scp
in more cases.  For example, when one file is local and the other is
remote, then scp can be invoked directly.  But the code does not do
that; it reads the source file into a buffer and then saves it.

I'll work on it.
-- 
A turnip curses Elvis

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

end of thread, other threads:[~2003-02-12 18:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-11 21:11 Tramp keep-time broken Lars Hansen
2003-02-12  7:52 ` Kai Großjohann
2003-02-12 11:18   ` Lars Hansen
2003-02-12 11:55     ` Kai Großjohann
2003-02-12 18:11     ` Kai Großjohann

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.