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

Re: Initial load of data into an svn repository. How to keep the date?

From: Dave Pawson <dave.pawson_at_gmail.com>
Date: 2007-08-29 16:44:57 CEST

Hi Greg.
(Glad I'm not alone in this view of svn!)

On 29/08/2007, Greg Rundlett <greg.rundlett@oasis-open.org> wrote:

> > > > There was a set of patches (not part of the official project) that
> > > > adds what you're asking for, but I don't know if it's kept pace with
> > > > Subversion itself.

> Dave,
>
> I totally agree with you that the mtime feature is needed in Subversion.
> Hopefully the issue doesn't get sidetracked yet again. I've got my fingers
> crossed that issue 1256 gets attention.

Any url please?

>
> The hack we've implemented as a work-around is to set a file property called
> mtime on each of the imported files. (At the time when you do an initial
> import, you presumably have a copy of the original files with their
> historical modification times, outside of subversion.)
Just checking.
  I have a full directory, lots of files, each with its own date and time.
(Or did you mean as a separate file? Directory, filename, atime?
If so I can do that easily, I have some Python that will generate
an xml file of this info)

 Then, after checkout,
> run a script that 'touches' the local working copy to use 'mtime'.

Oh you sneaky person!!!!
  I can do it on my Linux box...
  I guess its doable on Windows using cygwin...
Now I see where you're going.
Yes, I do keep a backup copy of the full directory, but an xml
file with the relevant data could be just as easy.
This is promising!

 Now you
> have a local working copy of files that are version-controlled and reside on
> the local file system displaying timestamps that reflect their 'mtime'
> property. You could combine this with a post_commit hook so that mtime (the
> property) gets updated on any subsequent file modification.

I've not used any hooks.
I guess the mess is that the mtime of the file is now n days prior
to the time of revision 1?
Starts to get a bit messy now :-)

>
> #!/bin/bash
> pushd /home/user/work/project-working-directory
> for FILE in `find . -mindepth 1|grep -v '.svn'`
> do
> echo Setting custom mtime on $FILE
> svn proplist "$FILE"|grep 'svn:mtime' >/dev/null
> if [ "$?" -eq 0 ]
> then
> MTIME=`svn propget svn:mtime "$FILE"`
> touch -d "$MTIME" "$FILE"
> fi
> done
> popd >/dev/null

Sorry to sound so ignorant Greg, is this post commit hook?

regards

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Aug 29 16:43:00 2007

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