From: Bil Kleb Date: 2007-09-04T17:20:08+09:00 Subject: Re: rsync functionality in Ruby? Paul van Delst wrote: > Hello, Hi. > I wrote a ruby script to allow me to automatically update a repository > working copy from an unversioned hierarchy. Is there anyway to use SVN's import command to get you 80% of the way there? See, for example, http://subversion.tigris.org/faq.html#in-place-import Or, some combination of `cp` and `svn diff`? E.g., svn co working_copy cp -r unversioned working_copy svn diff > patch [process the patch results] or perhaps some sort of inverse, e.g., U_DIRS=`find unversioned -type d` U_FILES=`find unversioned -type f` svn co working_copy cd working_copy S_DIRS=`find . \( -name .svn -prune \) -o -type d -print` S_FILES=`find . \( -name .svn -prune \) -o -type f -print` svn rm --force [ S_DIRS - U_DIRS ] svn rm --force [ S_FILES - U_FILES ] cp -r unversioned/* . svn ci -m'To sync with unversioned.' Regards, -- Bil Kleb http://nasarb.rubyforge.org