Syncing a non-versioned directory tree into the repository
From: Henderson, Michael D <michael.d.henderson_at_lmco.com>
Date: 2004-08-28 00:09:55 CEST
I have a directory tree where end-users dump data files that I need to add to the repository. I was looking at vendor drop in the book, but it isn't quite what I'm looking for. This isn't a two way process, the repository should only be updated via that data-dump directory tree. I can't version the data-dump tree, so I've created a process that uses a script to sync up the directory. It's pretty slow, though. The constant calls to diff seem to be the problem.
I replaced diff with cmp. That dropped the run time by about 10%, but it's still taking too long. So, I had the bright idea of just comparing the timestamps. Since I'm syncing the timestamps everytime I update the repository, it should only change if the source file is updated. If it has, I can copy the file, do the touch -r and then let svn commit figure out if the file has really changed.
I can write a program to do the stat and compare the timestamps, but I'm wondering two things - has this already been done and is there a better approach?
Thanks,
##############################################################################
echo "comparing source $sourceDir"
cd $targetDir || return 2
#
---------------------------------------------------------------------
|
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.