<?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>brunotavares.net: ScrapBook &#187; svn</title>
	<atom:link href="https://blog.brunotavares.net/?feed=rss2&#038;tag=svn" rel="self" type="application/rss+xml" />
	<link>https://blog.brunotavares.net</link>
	<description>Notes. tech and a few thoughs</description>
	<lastBuildDate>Sun, 25 Nov 2018 17:59:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Visual Diffs</title>
		<link>https://blog.brunotavares.net/?p=245</link>
		<comments>https://blog.brunotavares.net/?p=245#comments</comments>
		<pubDate>Tue, 02 Dec 2008 22:48:49 +0000</pubDate>
		<dc:creator>bat</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.brunotavares.net/?p=245</guid>
		<description><![CDATA[For some time now i started to notice the amount of time i wasted in solving version conflicts. The GNU diff works great with small change sets, but having a visual diff tool helps a lot when you&#8217;re dealing with long files with lots of diffs. I used several visuall-diff-editors whit the several version-control software [...]]]></description>
				<content:encoded><![CDATA[<p>For some time now i started to notice the amount of time i wasted in solving version conflicts. The GNU diff works great with small change sets, but having a visual diff tool helps a lot when you&#8217;re dealing with long files with lots of diffs. </p>
<p>I used several visuall-diff-editors whit the several version-control software and i currently use Meld: it&#8217;s gtk, has in-line edition ( let&#8217;s you change the working copy with a real-time diff computing ) and its &#8220;command line diff&#8221; and diff3 compatible which makes it work smoothly with version-control software.</p>
<p>So, for the both version-control systems that i use currently here is my setup</p>
<h4>SVN</h4>
<p>For a quick diff using meld just run:</p>
<p><code>$ svn diff--diff-cmd meld</code></p>
<p>For a permanent setup edit <code>~/.subversion/config</code> and set the <code>diff-cmd</code> to <code>meld</code></p>
<h4>GIT</h4>
<p>Write a small wrapper:</p>
<pre>
<code>
#!/usr/bin/env sh
meld $2 $5
</code>
</pre>
<p>and the just configure svn to use the wrapper as diff tool</p>
<p><code>git config --global diff.external /path/to/wrapper </code></p>
]]></content:encoded>
			<wfw:commentRss>https://blog.brunotavares.net/?feed=rss2&#038;p=245</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fine-grain SVN repository permissions over HTTP (DAV)</title>
		<link>https://blog.brunotavares.net/?p=207</link>
		<comments>https://blog.brunotavares.net/?p=207#comments</comments>
		<pubDate>Mon, 29 Sep 2008 00:01:25 +0000</pubDate>
		<dc:creator>bat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.brunotavares.net/?p=207</guid>
		<description><![CDATA[I use svn+apache2 to give access to all my repos. This is acomplished with dav_svn_module that allows you to give DAV SVN acess to one directory on your file system. I drop all my projects in /servers/svn/rep/ so, for a while, giving DAV access to /servers/svn/rep/ did the trick. The problem arises when you need [...]]]></description>
				<content:encoded><![CDATA[<p>I use svn+apache2 to give access to all my repos. This is acomplished with dav_svn_module that allows you to give DAV SVN acess to one directory on your file system.</p>
<p>I drop all my projects in /servers/svn/rep/ so, for a while, giving DAV access to /servers/svn/rep/ did the trick. The problem arises when you need to give different permissions to each repository ( and i really didn&#8217;t want to write one <code>&lt;Directory&gt;</code> directive for each repository ).</p>
<p>Well, fine-grain permissions ( r/w) per repository using DAV can be accomplished using the SVN AUTHZ. You can allow or deny read or write access to one user or user group by repository.</p>
<p>I&#8217;ll post a quick walktrough by my setup, it assumes you already have apache2 rolling with dav_svn_module and authz_svn_module.</p>
<h4>Apache Configuration</h4>
<p>First of all create a vhost/location for your SVN repo:</p>
<pre><code>

&lt;VirtualHost *&gt;
  ServerName    svn.yourhost.com

  &lt;Location /&gt;
        DAV svn
        # path to the directory holding your projects repositories.
        SVNParentPath /servers/svn/reps

        AuthType Basic
        AuthName "Subversion Repository"
        AuthUserFile /servers/svn/etc/svn-auth-file
        AuthzSVNAccessFile /servers/svn/etc/svn-authz-file

        require valid-user
  &lt;/Location&gt;

&lt;/VirtualHost&gt;

</code></pre>
<p>This above configuration will provide DAV access to /servers/svn/reps, mapping / to /servers/svn/reps. So, if you have a project called app1 you can acess app1 repository by pointing your browser to http://svn.yourhost.com/app1.</p>
<h4>Authentication</h4>
<p>We autenticate the users using apache builtin basic auth module. Just create the users file /servers/svn/etc/svn-auth-file using htpasswd command line util.<br />
Let&#8217;s add three users to illustrate our example: an app1 coder named Ruth, the server admin &#8220;bat&#8221; and a guest user.<br />
( Well, unfortunatelly the guest user will also have to have a password )</p>
<p><code>htpasswd -c /servers/svn/etc/svn-auth-file bat</code><br />
<code>htpasswd /servers/svn/etc/svn-auth-file ruth</code><br />
<code>htpasswd /servers/svn/etc/svn-auth-file guest</code></p>
<h4>Authorization</h4>
<p>Now we need to limit certain users to certain repositories .This is accomplished by adding some rules to the /servers/svn/etc/svn-authz-file file.<br />
First of all state your user groups by adding the following block to the file:</p>
<pre><code>
[groups]
admin=bat
others=guest
coders=ruth

</code></pre>
<p>As a fail safe, let&#8217;s deny read acess to the base dir to anyone except admins</p>
<pre><code>

[/]
* =
@admin = rw

</code></pre>
<p>Finally, lets give our coder, Ruth, rw acess to our app1 repository.<br />
Since our app1 is open source, let&#8217;s also allow our guest to read from the repository to checkout the latest developments.</p>
<pre><code>

[app1:/]
@coders = rw
@others = r
@admin = rw

</code></pre>
<p>Just restart your apache and checkout app1 by typing:<br />
<code>$ svn co http://svn.yourhost.com/app1/trunk</code></p>
]]></content:encoded>
			<wfw:commentRss>https://blog.brunotavares.net/?feed=rss2&#038;p=207</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
