unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* C-x v u via *.~REV.~ reset file date to 1970-01-01
@ 2003-08-26  2:26 Simon Josefsson
  2003-08-26  4:01 ` Andre Spiegel
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Josefsson @ 2003-08-26  2:26 UTC (permalink / raw)


Visit a file in CVS and type a SPC and then remove it and save the
file. VC generate a backup file dated 1970-01-01:

jas@latte:~/src/libidn$ ls -la Makefile.am*
-rw-r--r--    1 jas      staff        1959 2003-08-26 04:22 Makefile.am
-rw-r--r--    1 jas      staff        1959 1970-01-01 01:00 Makefile.am.~1.91.~
jas@latte:~/src/libidn$ 

If you then do C-x v u, Emacs move the backup file back to the
original, but keeps the file date.  BSD make seem to use time=0 to
mean that the file doesn't exist, so you get an error that the file
doesn't exist, which is rather confusing.

For CVS, why not use the file date stored in CVS/Entries?  It would be
even better than using current time, which otherwise would be one
solution.

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

* Re: C-x v u via *.~REV.~ reset file date to 1970-01-01
  2003-08-26  2:26 C-x v u via *.~REV.~ reset file date to 1970-01-01 Simon Josefsson
@ 2003-08-26  4:01 ` Andre Spiegel
  0 siblings, 0 replies; 2+ messages in thread
From: Andre Spiegel @ 2003-08-26  4:01 UTC (permalink / raw)


On Tue, 2003-08-26 at 04:26, Simon Josefsson wrote:

> Visit a file in CVS and type a SPC and then remove it and save the
> file. VC generate a backup file dated 1970-01-01:
> 
> jas@latte:~/src/libidn$ ls -la Makefile.am*
> -rw-r--r--    1 jas      staff        1959 2003-08-26 04:22 Makefile.am
> -rw-r--r--    1 jas      staff        1959 1970-01-01 01:00 Makefile.am.~1.91.~
> jas@latte:~/src/libidn$ 

I see this on my system (Debian) too, but it's clearly an error.  VC
creates the backup file using copy-file with KEEP-TIME non-nil
(vc-hooks.el, line 594).  The doc string of copy-file does mention that
KEEP-TIME doesn't work on all systems, but I would assume GNU/Linux is
not one of them, and even if it doesn't work on a system, 1970-01-01 is
clearly not an acceptable date.

Something must be broken in copy-file, fileio.c.  Ken Raeburn's change
of 2002-07-15 (version 1.454) may be a candidate, since it's the last
time the keep-time stuff was changed, but I'm not knowledgable in this
area.  Could somebody else please have a look?

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

end of thread, other threads:[~2003-08-26  4:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-26  2:26 C-x v u via *.~REV.~ reset file date to 1970-01-01 Simon Josefsson
2003-08-26  4:01 ` Andre Spiegel

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).