On Aug 9, 2007, at 11:58 AM, Chris Spencer wrote:
> The reason I asked is I've been trying to tag only the files that have
> been changed, so I can FTP a few hundred KB of data, instead of a
> GB of
> code in my trunk.
I presume it's not possible, for whatever reason, simply to have an
SVN working copy on the FTP destination. I have a similar situation:
my personal web site is served from a host that doesn't have SVN
installed -- and anyway, they charge me for the disk space, and
Subversion's "text-base" copy of every file means I'd have to pay
twice as much for the web site storage. But I want to edit the site
on my local computer, and I keep it version-controlled in a
repository I created. So every time I make a change, I need to copy
the changes over to the web server host. Sound like the neighborhood
you're in?
What I actually do for this is keep a file called "last_update.txt"
in the working copy, which records the Subversion version as of the
last update. (Well, OK, you probably figured that out, eh?). I have
a script that uses this info to select files to copy:
# learn Subversion revision of the last time we did this
last_update=$(<last_update.txt)
last_update=${last_update%%:*}
# update the local working copy, to be sure we're current
# note current version for future reference
svn up
ver=$(/usr/local/bin/svnversion .)
# collect up list of changed files/directories/paths
# clean up the output a bit
# feed through cpio (the only archiver I know that takes a list of
files on stdin)
# compress, just for network efficiency
# feed through SSH to a matching cpio that unpacks it on the
webserver host
svn log -vr$last_update:BASE |
/usr/bin/sed -n '/^ [MA] \/trunk\/www\//s///p' |
/usr/bin/cpio -o |
/sw/bin/gzip |
/usr/bin/ssh user@webserver.host '/usr/contrib/bin/gunzip | (cd www; /
sco/bin/cpio -iv)'
# record that we've done all that
echo $ver > last_update.txt
svn ci -m"Published version $(<last_update.txt) on $(date)"
-==-
Jack Repenning
Chief Technology Officer
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
office: +1 650.228.2562
mobile: +1 408.835.8090
raindance: +1 877.326.2337, x844.7461
aim: jackrepenning
skype: jrepenning
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: users-help@subclipse.tigris.org
Received on Thu Aug 9 21:22:51 2007