Preserving timestamps

Miguel Freitas miguel at cpti.cetuc.puc-rio.br
Mon Aug 6 09:40:35 CDT 2007


Hi,

Before you fry me in boiling oil... :-)
I did read the FAQ ("Why is the modification time of files not
restored on checkout?") and recent messages on ml ("Maintaining
modified dates of files"). but...

I'm currently using hg to manage a FPGA project with Xilinx tools.
Their IDE stores about all files, schematics and stuff in plain text,
which is a very good thing to allow using hg.

However Xilinx has the bad habit of keeping the modification date of
symbol files (the file that describes those small blocks containing
input/output pins) inside the schematic that actually uses the symbol.

Something like that:

BEGIN BLOCKDEF iobuf8
            TIMESTAMP 2007 7 30 22 57 21

As you might guess this breaks things pretty badly whenever i do a new
checkout.

Since the modification date is different, xilinx asks to rebuild the
symbols - it will create a new ones with default configuration. This
way we lose any changes we did (like pin position, symbol size) to the
symbol file itself.

Another related annoyance is that it also produces several changes to
the TIMESTAMP fields in the schematic files, requiring useless commits
(which will cause the same problem to the other developers - an
infinite loop!).

My question is, i know preserving mtimes is bad in general, but is it
possible to implement this feature for a specific set of files in a
repository?

Also, before i dig into hg internals, does it currently store the
mtime on his internal structures? would i have any chance if i want to
hack a new extension for restoring the mtime? any hint on what hook to
use?

thanks,

Miguel


More information about the Mercurial mailing list