<?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>iphone and gis development notes &#187; subversion</title>
	<atom:link href="http:///wordpress/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>/wordpress</link>
	<description>By Rupert</description>
	<lastBuildDate>Mon, 26 Jul 2010 05:06:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Subversion</title>
		<link>/wordpress/2009/11/subversion/</link>
		<comments>/wordpress/2009/11/subversion/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 22:22:01 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">/wordpress/?p=634</guid>
		<description><![CDATA[This post will contain a summary of information regarding subversion scattered from old posts. Installation on Debian 1. Packages #apt-get install subversion #apt-get install libapache2-svn 2. Login as root then create the repository. #cd /data #svnadmin create /repos --fs-type fsfs 3. Set the permissions #groupadd subversion #addgroup rupert subversion #addgroup www-data subversion &#160; #chown -Rf]]></description>
			<content:encoded><![CDATA[<p>This post will contain a summary of information regarding subversion scattered from old posts.</p>
<h3>Installation on Debian</h3>
<p>1. Packages</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#apt-get install subversion
#apt-get install libapache2-svn</pre></div></div>

<p>2. Login as root then create the repository.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#cd /data
#svnadmin create /repos --fs-type fsfs</pre></div></div>

<p>3. Set the permissions</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#groupadd subversion
#addgroup rupert subversion
#addgroup www-data subversion
&nbsp;
#chown -Rf www-data:subversion /data/repos
#chmod -Rf 770 repos</pre></div></div>

<p>It&#8217;s better to set the necessary users and groups that would use subversion now. Later on, if we need to checkout using svn+ssh and setup a passwordless svn, then we won&#8217;t get permission issues.</p>
<p>4. In /etc/apache2/sites-available/2rmobile, add this to the configuration.</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">        &lt;Location /repos&gt;
        DAV svn
        SVNPath /data/repos
        SVNAutoversioning on
        AuthType Basic
        AuthName &quot;SVN - Your Project&quot;
        AuthUserFile /data/svn-auth-file
        Require valid-user
        &lt;/Location&gt;</pre></div></div>

<p>5. Enable the webdav module then restart apache.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#a2enmod dav
#a2enmod dav_svn
#/etc/init.d/apache2 restart</pre></div></div>

<h3>Passwordless SVN</h3>
<p>On your local macbook pro (mbp), we need to generate the ssh keys from the local machine, upload it to the remote machine and append it in the authorized_keys.</p>
<p><em>On the local machine:</em></p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#ssh-keygen -t rsa
...
#cd /Users/rupert/.ssh
#scp -r id_rsa.pub rupert@2rmobile.com:/home/rupert/.ssh/id_rsa_mbp.pub</pre></div></div>

<p><em>On the remote machine:</em></p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#cd ~/.ssh
#touch authorized_keys
#cat id_rsa_mbp.pub &gt;&gt; authorized_keys</pre></div></div>

<p>Test on the local machine by doing</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">ssh rupert@2rmobile.com</pre></div></div>

<p>. In my mbp, a dialog box from keychain is asking for the password. To circumvent this, we can add the passphrase to our identities.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#ssh-add -K
... enter the passphrase twice...
#ssh-add -k (adds it to the identities)
#ssh-add -l (lists the identities)</pre></div></div>

<p>Now the benefits of having a passwordless svn:<br />
- ofcourse it saves us a lot of time<br />
- rails capistrano deployment</p>
<p>References:<br />
<a href="http://www.howtoforge.com/debian_subversion_websvn">http://www.howtoforge.com/debian_subversion_websvn</a></p>
<h3>Subversion Tips and Tricks</h3>
<p><a href="http://subversion.tigris.org/faq.html#ssh-authorized-keys-trick">http://subversion.tigris.org/faq.html#ssh-authorized-keys-trick</a></p>
<p><strong>1. Checking out using svn+ssh and having passwordless ssh authentication. My personal favorite when working with personal projects since I have full control. </strong></p>
<pre>
svn co svn+ssh://www.2rmobile.com/data/repos/web/rails/halalan2010 halalan2010
</pre>
<p>But for work projects, I normally use webdav</p>
<pre>
svn co "http://www.2rmobile.com/repos/web/halalan2010" halalan2010
</pre>
<p><strong>2. svn+ssh on a custom or different port other than 22. I have my ssh on 2210, so we need to tell svn+ssh to use 2210</strong></p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">vim ~/.subversion/config
 41 [tunnels]
 42 ### Configure svn protocol tunnel schemes here.  By default, only
....
 53 ### built-in ssh scheme were not predefined, it could be defined
 54 ### as:
 55 ssh = $SVN_SSH ssh -p 2210</pre></div></div>

<p><a href="http://www.techper.net/2009/01/11/changing-port-number-of-svnssh-subversion-protocol/">http://www.techper.net/2009/01/11/changing-port-number-of-svnssh-subversion-protocol/</a></p>
<p><strong>3. svn diff</strong> &#8211; shows you the changes in a directory. This is useful for creating patches.</p>
<pre>
svn diff -r HEAD
svn st -q
</pre>
<p><strong>3. svn switch oldURL to newURL </strong>- very useful when I&#8217;m working at home or in the office, since the svn server has a public/private IP.</p>
<p><strong>4. svn log</strong> &#8211; shows you who committed and why (from the messages)</p>
<p><strong>5. ignoring specific files in a directory. i.e rails directories</strong></p>
<pre>svn propset svn:ignore "*.log" log</pre>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2009/11/subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN CheatSheet</title>
		<link>/wordpress/2008/03/svn-cheatsheet/</link>
		<comments>/wordpress/2008/03/svn-cheatsheet/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 20:38:45 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.gisnotes.com/wordpress/index.php/2008/03/16/svn-cheatsheet/</guid>
		<description><![CDATA[Just a list of svn commands that I find useful everyday&#8230; 1. svn diff &#8211; shows you the changes in a directory. This is useful for creating patches. svn diff -r HEAD svn st -q 2. svn switch oldURL to newURL - very useful when I&#8217;m working at home or in the office, since the]]></description>
			<content:encoded><![CDATA[<p>Just a list of svn commands that I find useful everyday&#8230;</p>
<p><strong>1. svn diff</strong> &#8211; shows you the changes in a directory. This is useful for creating patches.</p>
<pre>
svn diff -r HEAD
svn st -q
</pre>
<p><strong>2. svn switch oldURL to newURL </strong>- very useful when I&#8217;m working at home or in the office, since the svn server has a public/private IP.</p>
<p><strong>3. svn log</strong> &#8211; shows you who committed and why (from the messages)</p>
<p><strong>4. ignoring specific files in a directory</strong><br />
svn propset svn:ignore &#8220;*.log&#8221; log</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/03/svn-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trac slow on updating or creating tickets</title>
		<link>/wordpress/2008/03/trac-slow-on-updating-or-creating-tickets/</link>
		<comments>/wordpress/2008/03/trac-slow-on-updating-or-creating-tickets/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 15:36:56 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[trac]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.gisnotes.com/wordpress/index.php/2008/03/09/trac-slow-on-updating-or-creating-tickets/</guid>
		<description><![CDATA[This has been a productivity hogger for us for quite a few weeks and we really had no clue at it first. What I noticed was after enabling logging on trac.ini: [logging] log_file = trac.log log_level = CRITICAL log_type = file was that every post was being sent to an SMTP server. 2008-03-09 19:50:49,323 Trac[__init__]]]></description>
			<content:encoded><![CDATA[<p>This has been a productivity hogger for us for quite a few weeks and we really had no clue at it first. What I noticed was after enabling logging on trac.ini:</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">[logging]
log_file = trac.log
log_level = CRITICAL
log_type = file</pre></div></div>

<p>was that every post was being sent to an SMTP server.</p>
<p><span id="more-162"></span></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">2008-03-09 19:50:49,323 Trac[__init__] DEBUG: Dispatching &lt;request&gt;
2008-03-09 19:50:49,335 Trac[__init__] DEBUG: action controllers: [
&lt;trac&gt;]
2008-03-09 19:51:48,483 Trac[__init__] INFO: Sending SMTP notification to 192.168.1.15:25 to [u'rupert@cybersoftchina.com', u'dev@cybersoftchina.com']
2008-03-09 19:51:53,610 Trac[__init__] DEBUG: Retrieving session for ID 'rupert'
2008-03-09 19:51:53,654 Trac[__init__] DEBUG: Dispatching &lt;request&gt;
&lt;/request&gt;&lt;/trac&gt;&lt;/request&gt;</pre></div></div>

<p>The culprit as you expected was my slow qmail server which for some reason I can&#8217;t figure out for now.</p>
<p><strong>Workaround</strong><br />
I have to disable email alerts for every new/update ticket for the time being.</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">[notification]
admit_domains =
always_notify_owner = true
always_notify_reporter = true
always_notify_updater = true
ignore_domains =
mime_encoding = base64
#smtp_always_bcc =
#smtp_always_cc = dev@cybersoftchina.com
#smtp_default_domain =
#smtp_enabled = true
#smtp_from = trac@cybersoftchina.com
#smtp_from_name = Trac Auto Notification CNCPHS
#smtp_password = cybertrac2007
#smtp_port = 25
#smtp_replyto = dev@cybersoftchina.com
#smtp_server = 192.168.1.15
#smtp_subject_prefix = __default__
#smtp_user = trac@cybersoftchina.com
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = false
use_short_addr = false
use_tls = false</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/03/trac-slow-on-updating-or-creating-tickets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
