On Wednesday 29 August 2007 08:27:01 am Andy Levy wrote:
> On 8/29/07, Dave Pawson <dave.pawson@gmail.com> wrote:
> > On 29/08/2007, Andy Levy <andy.levy@gmail.com> wrote:
> > > > I doubt I'm the only one using svn for backups. Perhaps I could put
> > > > it in as a feature request (option perhaps?)
> > >
> > > But Subversion isn't a backup tool.
> >
> > It is for me?
> > I use it for software development (Sourceforge project)
> > and backup at home.
> > Except for this date feature it operates exceptionally well.
> >
> > With Tortoise svn my non geek wife uses it quite happily
> > to back up here client data. Great tool.
>
> No, you're using Subversion to make additional copies of things -
> xcopy.exe and the like are also "backup tools" in this regard. A
> backup tool has different features & requirements.
>
> > > 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.
> >
> > Unless its really going to mess with the core code, perhaps
> > this feature could be added as an optional use?
>
> That's up to the SVN devs. If you really want the feature, fund its
> development. Also, keep an eye on
> http://subversion.tigris.org/issues/show_bug.cgi?id=1256
>
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.
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.) Then, after checkout,
run a script that 'touches' the local working copy to use 'mtime'. 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.
#!/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
---------------------------------------------------------------------
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:20:54 2007