Maintaining modified dates of files

Steve Greenland steveg at moregruel.net
Tue Jul 24 16:19:12 CDT 2007


According to Charles Pope  <charles.pope at retaininternational.com>:
> 
> If I clone a repository on Windows, or update files, I notice that the
> modified date and time on files uses the current time. Is there an option to
> maintain dates and times on files as they originally were? I couldn't see
> one on initial inspection. It is quite useful when you are looking at files
> through explorer.

Since nobody else has answered (publically, anyway), I'll try:

No.

The reason hg (and most SCMs) don't do this is because it would break
_make_ and make-like tools that depend on dates to determine what's
newer. For example, if you did a build, and then pulled from another
repo with changes that were older, your next build wouldn't rebuild
those files if they kept their modified date.

This is okay with those of us who have been burned repeatedly by
believing that file timestamps have any correspondence with reality. :-)

Steve

-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net



More information about the Mercurial mailing list