[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: import files preserving timestamps

From: Reedick, Andrew <jr9445_at_ATT.COM>
Date: Tue, 10 Jun 2008 12:22:44 -0500

> -----Original Message-----
> From: Les Mikesell [mailto:lesmikesell_at_gmail.com]
> Sent: Tuesday, June 10, 2008 12:42 PM
> To: Reedick, Andrew
> Cc: users_at_subversion.tigris.org
> Subject: Re: import files preserving timestamps
> Reedick, Andrew wrote:
> >
> >
> > Actually, "svn ls -v ... | sort" would be your friend. Instead of
> > sorting by timestamp, you're sorting by last changed revision
> > which in most cases is as good as or more accurate than timestamps.
> Is there a handy tool to do that and update file timestamps in a way
> that everything else will understand (so web servers will know when
> resend, for example)?

As I understand it, you can set the timestamps to svn's "Last Changed
Date" using "use-commit-times". That way consistent timestamps will be
used across all workspaces on all web servers in the server farm.

And no, 3rd party apps would have to be Subversion aware to take
advantage of things like 'svn status', etc.

> > As for timestamps in general, they're a recommendation, not an
> absolute
> > truth. The only trusted way to manage versioned files in the wild
> to
> > audit them either via checksums or bit comparisons. So the real
> > solution to timestamps is to develop an auditing system that's as
> > easy/fast to use as eyeballing timestamps. Which implies creating
> > baselines and more importantly, accurately recording what baseline
> > should be where.
> Does svn do that when deciding which files have been changed compared
> to
> the pristine copies?

In a workspace, yes. If the files are deployed outside of a workspace,
you will need a tool to do so. IIRC, one version of tar will actually
compare the files in the tar with the externally deployed files.

A poor man's audit tool:
        find . | xargs cksum | perl -ne 'chomp; @a=split(/ /, $_, 3);
print qq($a[2],$a[0],$a[1]\n);' | sort > master.txt
        chmod 444 master.txt
        Put the command in cron save the output as audit.txt.
        diff master.txt audit.txt > diff.txt
        email the results.

> > Once you can push a button to determine if you have the correct set
> of
> > files, the desire for accurate timestamps diminishes greatly.
> And svn?



The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA622

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-06-10 19:23:15 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.