GNU bug report logs - #3298
vc-revert-buffer sets file time-stamp into the past.

Previous Next

Package: emacs;

Reported by: Sergei Organov <osv <at> javad.com>

Date: Fri, 15 May 2009 20:00:05 UTC

Severity: normal

Tags: patch

Merged with 5181

Fixed in version 24.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3298 in the body.
You can then email your comments to 3298 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3298; Package emacs. (Fri, 15 May 2009 20:00:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sergei Organov <osv <at> javad.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 15 May 2009 20:00:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Sergei Organov <osv <at> javad.com>
To: bug-gnu-emacs <at> gnu.org
Subject: vc-revert-buffer sets file time-stamp into the past.
Date: Fri, 15 May 2009 22:43:18 +0400
Hello,

When I have a file under version control (CVS), make some changes to the
file, save it, and then call vc-revert-buffer (bound to C-x v u), the
resulting reverted file has time-stamp in the past. To see the problem
one needs to wait a little after checking out the file(s) before
modifying/saving the testing file, because it's at this moment the
backup of the file is being created with the time-stamp of initial file,
and it's that backup file will later be copied to create reverted file.

That's how it goes:

Before change/save:

file.cc (old time)

After change/save:

file.cc (new time)
file.cc.~1.3~ (old time)

After revert:

file.cc (old time)

This badly affects make, is inconsistent with the way revert is
performed by PCL-CVS, and is inconsistent with manual revert of a file
using CVS command-line:

$ rm FILE; cvs update FILE

The offending code is in the "vc.el" `vc-revert-file' function:

       (copy-file backup-file file 'ok-if-already-exists 'keep-date)

It's `keep-date' that leads to the old time-stamp being assigned to the
reverted file.

In GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
 of 2008-11-10 on raven, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t






Merged 3298 5181. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sat, 12 Dec 2009 19:55:07 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sat, 12 Dec 2009 19:55:08 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Aug 2011 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 10 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.