<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.betabong.com &#187; svn</title>
	<atom:link href="http://blog.betabong.com/tag/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.betabong.com</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 10:45:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SVN Hook – auto-upload to FTP</title>
		<link>http://blog.betabong.com/2008/08/14/svn-hook-%e2%80%93-auto-upload-to-ftp/</link>
		<comments>http://blog.betabong.com/2008/08/14/svn-hook-%e2%80%93-auto-upload-to-ftp/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 08:52:39 +0000</pubDate>
		<dc:creator>betabong</dc:creator>
				<category><![CDATA[Frontend]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=51</guid>
		<description><![CDATA[<p>SVN is definitely cool. So I use it for quite all of my projects. Being able to jump back, having a versioned backup, share-coding with others – awesome.</p>
<p>But most of my projects are to run on some kind of&#8230; <a href="http://blog.betabong.com/2008/08/14/svn-hook-%e2%80%93-auto-upload-to-ftp/" class="read_more">Read more</a></p>
No related posts.]]></description>
			<content:encoded><![CDATA[<p>SVN is definitely cool. So I use it for quite all of my projects. Being able to jump back, having a versioned backup, share-coding with others – awesome.</p>
<p>But most of my projects are to run on some kind of webserver. Usually I use my local webserver to test, so I can symlink directly into the projects (and then upload to productive manually). That&#8217;s okay for me. But for a recent project I have to test on some remote ftp. So shall I each time commit/update then upload to FTP? And all other team members too? Come on, we are humans, that is stupid repetitive computer work!</p>
<p>So I discovered SVN hooks. These are kind of scripts that can be called each time a SVN repository is changed. Find the directory in path/to/repos/hooks. I found this for my FTP hook: <a href="http://svn2web.svn.sourceforge.net/viewvc/svn2web/trunk/">svn2web</a> – it&#8217;ll give you all you need to setup the hook. The real cool thing is that you can define the ftp/sftp-behaviour in SVN properties:</p>
<pre>svn propset svn2web "sftp:username:password@machine:/path" .</pre>
<p>My pre-commit hook looks like this:</p>
<pre>#!/bin/bash
export PATH=/usr/local/bin:/usr/bin:/bin
svn2web $1 $2 &gt;&gt; /tmp/svn2web.log || exit 1
exit 0</pre>
<p>Be aware of two things:</p>
<ol>
<li>Install svn2web commands in /usr/local/bin – now you have to export the path variables in the hook script, because it will be called without any path variables (for security reasons)</li>
<li>If the ftp upload fails for whatever reason, the commmit will fail too. That&#8217;s what we want, usually, because otherwise we wouldn&#8217;t get any feedback on comitting. If you don&#8217;t want, just setup the hook as post-commit.</li>
</ol>
<p>For some reasons my ftp-upload hook wouldn&#8217;t work on this stupid test server. I spent quite some time figuring out why and what. It seemed that whenever ftp tried to PUT, the ftp server tried to change to some extended passive mode and would hang there. I found out that when calling the command</p>
<pre>epsv</pre>
<p>before ftp operations, this wouldn&#8217;t happen. So, cool :-)</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2008/08/14/svn-hook-%e2%80%93-auto-upload-to-ftp/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Flex Project &#8211; SVN Strategy</title>
		<link>http://blog.betabong.com/2008/07/16/flex-project-svn-strategy/</link>
		<comments>http://blog.betabong.com/2008/07/16/flex-project-svn-strategy/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 10:35:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Frontend]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=13</guid>
		<description><![CDATA[<p>I like to keep all my projects on a svn server. So far this was just for myself and I didn&#8217;t care much about the simplicity of checking out and in – a little chaos is acceptable if you&#8217;re up&#8230; <a href="http://blog.betabong.com/2008/07/16/flex-project-svn-strategy/" class="read_more">Read more</a></p>
Related posts:<ol>
<li><a href='http://blog.betabong.com/2008/12/03/test-movie-from-flex-to-flash-easy-way/' rel='bookmark' title='Test Movie from Flex to Flash (easy way)'>Test Movie from Flex to Flash (easy way)</a></li>
<li><a href='http://blog.betabong.com/2008/11/29/flex-builder-t-flash-ide/' rel='bookmark' title='Develop in Flex Builder, publish in Flash IDE (Mac OS X)'>Develop in Flex Builder, publish in Flash IDE (Mac OS X)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I like to keep all my projects on a svn server. So far this was just for myself and I didn&#8217;t care much about the simplicity of checking out and in – a little chaos is acceptable if you&#8217;re up to handle it ;)</p>
<p>Finally I was forced to rethink this strategy because I wanted to let other people work on a project. As many actionscript projects, this one also heavily relies on external libraries, most of them hosted by Google Code, another one being my own (closed) lib. So should I tell people: «hey, just svn checkout from here and there and then relink the libs in the project properties but don&#8217;t check in the updated settings for christ&#8217;s sake!»No. Too shaky, really.</p>
<p>Fortunately, SVN provides a fucking cool way to solve this issue: svn:externals. <span id="more-13"></span>Ha! This is so awesome, you won&#8217;t believe it ;-) Okay, here are the steps to follow (on a mac at least):</p>
<p>Create a flex project:</p>
<ul>
<li>project
<ul>
<li>html-template</li>
<li>src</li>
</ul>
</li>
</ul>
<p>Add a new directory:</p>
<ul>
<li>project
<ul>
<li>html-template</li>
<li>src</li>
<li>externals</li>
</ul>
</li>
</ul>
<p>Now put this on your svn, either by svn add or by putting in the repos and checking out again (well.. just as you did). If you&#8217;ve already got bin-debug or bin-release directories, just remove them on the repos and svn update (they are created with each publish in flex).</p>
<p>Now let&#8217;s say our project resides in ~/Documents/projects/project (path to project). Do the following in Terminal:</p>
<pre>cd ~/Documents/projects/project/externals
svn svn propedit svn:externals .</pre>
<p>This should open an editor (in my case I&#8217;ve defined textmate as my editor by doing:)</p>
<pre>export EDITOR='mate -w'</pre>
<p>Enter the following (example libraries):</p>
<pre>caurinatweener http://tweener.googlecode.com/svn/trunk/as3/
as3corelib http://as3corelib.googlecode.com/svn/</pre>
<p>You can also add a specific release:</p>
<pre>caurinatweener -r23 http://tweener.googlecode.com/svn/trunk/as3/</pre>
<p>(in TextMate save and close, if you use vim you know what to do anyway)</p>
<p>Now comes the magic part:</p>
<pre>svn up</pre>
<p>This will checkout all defined libraries into externals/xyz!! you do <code>svn commit</code> and now every time somebody checks out your project (or your externals directory) all the libs will be checked out automatically! I think this is just fucking awesome! :-)</p>
<p>Now in Eclipse all paths to your external libraries will be relative to the project (of course you have to add the libs there or change the paths – you should know how to do that ;))</p>
<p>Now all we need to is ignoring bin-release and bin-debug. We don&#8217;t want these directories to be in our svn repos:</p>
<pre>cd ~/Documents/projects/project
svn svn propedit svn:ignore .</pre>
<p>enter a list of directories or files to be ignored. in our case:</p>
<pre>bin-debug
bin-release</pre>
<p>That&#8217;s it! Thanks, svn!</p>
<p>Related posts:<ol>
<li><a href='http://blog.betabong.com/2008/12/03/test-movie-from-flex-to-flash-easy-way/' rel='bookmark' title='Test Movie from Flex to Flash (easy way)'>Test Movie from Flex to Flash (easy way)</a></li>
<li><a href='http://blog.betabong.com/2008/11/29/flex-builder-t-flash-ide/' rel='bookmark' title='Develop in Flex Builder, publish in Flash IDE (Mac OS X)'>Develop in Flex Builder, publish in Flash IDE (Mac OS X)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2008/07/16/flex-project-svn-strategy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: blog.betabong.com @ 2012-02-05 05:33:10 -->
