<?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>Colin Mollenhour&#039;s Technical Blog &#187; subversion</title>
	<atom:link href="http://colin.mollenhour.com/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://colin.mollenhour.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 31 Jul 2010 06:52:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Module Manager Update, now on Google Code!</title>
		<link>http://colin.mollenhour.com/2010/01/31/module-manager-update/</link>
		<comments>http://colin.mollenhour.com/2010/01/31/module-manager-update/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 04:15:40 +0000</pubDate>
		<dc:creator>colin</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://colin.mollenhour.com/?p=109</guid>
		<description><![CDATA[
I recently updated Module Manager (first post) to support nested modules and renamed the .modman definitions file to simply modman for easier editing in IDEs. To top it off I am officially releasing it to the public under the Apache License 2.0 so that you may start using it in your own projects.

Additionally, Module Manager [...]]]></description>
			<content:encoded><![CDATA[<p>
I recently updated Module Manager (<a href="http://colin.mollenhour.com/2009/10/17/module-manager-for-when-svnexternals-just-doesnt-cut-it/">first post</a>) to support nested modules and renamed the <code>.modman</code> definitions file to simply <code>modman</code> for easier editing in IDEs. To top it off I am officially releasing it to the public under the Apache License 2.0 so that you may start using it in your own projects.</p>
<p>
Additionally, <span style="font-size:120%; font-weight:bold;"><a href="http://code.google.com/p/module-manager/">Module Manager</a></span> now has it&#8217;s own home on Google Code so check it out! (pun intended)
</p>
<p>
Here is an example of the new <b>nested modules</b> feature:
</p>
<pre class="brush: plain;">
# My template files
skin               skin/frontend/my/default
design             app/design/frontend/my/default

# Import Colin_HotDealz module
@import            modules/Colin_HotDealz
</pre>
]]></content:encoded>
			<wfw:commentRss>http://colin.mollenhour.com/2010/01/31/module-manager-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Module Manager &#8211; for when svn:externals just doesn&#8217;t cut it.</title>
		<link>http://colin.mollenhour.com/2009/10/17/module-manager-for-when-svnexternals-just-doesnt-cut-it/</link>
		<comments>http://colin.mollenhour.com/2009/10/17/module-manager-for-when-svnexternals-just-doesnt-cut-it/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 05:38:16 +0000</pubDate>
		<dc:creator>colin</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://colin.mollenhour.com/?p=96</guid>
		<description><![CDATA[
Update 1/30/2010:
Added nested modules, renamed .modman file to modman, released under Apache License 2.0, and hosted on Google Code.

This project was inspired by my recent Magento development work so I&#8217;m not sure how much application it has outside of that, but if you&#8217;ve ever wanted to use svn:externals with individual files (you can&#8217;t btw) then [...]]]></description>
			<content:encoded><![CDATA[<hr/>
<p><span style="font-size:120%; font-weight:bold"><a href="http://colin.mollenhour.com/2010/01/31/module-manager-update/">Update 1/30/2010:</a></span><br />
Added nested modules, renamed .modman file to modman, released under Apache License 2.0, and hosted on Google Code.</p>
<hr/>
<p>This project was inspired by my recent Magento development work so I&#8217;m not sure how much application it has outside of that, but if you&#8217;ve ever wanted to use svn:externals with individual files (you can&#8217;t btw) then this is the next best thing (and therefore the best thing). Perhaps some other VCS supports this functionality natively , if you know of it please clue me in. I&#8217;ve used git and bazaar but still like the simplicity of subversion for small, non-distributed projects.</p>
<p>Magento&#8217;s source code is split among several different groups of files: code, design, locale, skin, libs, etc (as in config), etc.. (as in etcetera)<br />
You really cannot avoid ever having to mix a file in here or there which means svn:externals won&#8217;t cut it. Besides, svn:externals won&#8217;t let you make one commit from all of your externals so to commit your changes you have to do it once for each folder which makes your commit history nearly useless. Enter &#8220;modman&#8221;, my Magento module manager. While it could be used for deployment it is primarily geared towards developers. Here is how it works:</p>
<p><span id="more-96"></span></p>
<p>Create a branch and put your source code in it. Now create a &#8220;.modman&#8221; file within the root of the branch. In this file you define (much like svn:externals) a path within your repository and the path that it should map to. Here is an example (with a fictitious module named &#8220;HotDealz&#8221;:</p>
<pre class="brush: plain;">
code   app/code/local/Colin/HotDealz
template   app/design/frontend/default/default/template/hotdealz
hotdealz.xml   app/design/frontend/default/default/layout/hotdealz.xml
images   skin/frontend/default/default/images/hotdealz
HotDealz.csv   app/locale/en_US/Colin_HotDealz.csz
</pre>
<p>As you can see, very similar to svn:externals only with individual file support which is handy for things like locale files that can&#8217;t go in subdirectories.</p>
<h2>How It Works</h2>
<p>Usage is similar to regular command line usage of subversion. The &#8220;modman&#8221; script provides a wrapper around svn which checks the code out in a .modman directory at the root of your project then reads the .modman file and creates symbolic links as necessary so that your source code is actually all contained within one directory and your webserver accesses the files where they are supposed to be. No svn:externals definitions are used. Obviously this requires a few things:</p>
<ol>
<li>bash</li>
<li>a webserver that is configured to FollowSymLinks</li>
</ol>
<p><br/></p>
<p>
If you do web development on Windows, you may be thinking, &#8220;What about Windows support!?&#8221;. Well, you have a few options:
</p>
<ul>
<li>Do your development inside a VirtualBox instance of Linux and share the drive to Windows for editing on your IDE (recommended).</li>
<li>Try to configure cygwin to work (untested, not recommended).</li>
</ul>
<p><br/></p>
<p>
I chose the former long before I wrote this script since the servers for my projects are all Linux-based and doing development on WAMP when your project runs on L*MP is silly. You can actually still use TortoiseSVN by simply opening the .modman directory from explorer so really after the initial checkout you do not need to continue to use the script except for when adding new definitions to the .modman file.
</p>
<h2>Sample Usage</h2>
<p>Here are some typical commands used with modman:</p>
<pre class="brush: plain;">
$ modman --help
$ modman init
$ modman hotdealz checkout &quot;svn url here&quot;
$ modman hotdealz status (can be run from any directory within the project root)
$ modman hotdealz commit
$ modman hotdealz update
$ modman hotdealz add Colin_HotDealz.xml app/etc/modules/HotDealz.xml
etc...
</pre>
<p>Most commonly used svn commands are passed through to svn for convenience but for advanced work you can just cd to the .modman directory or use TortoiseSVN or your IDE&#8217;s integrated subversion tools (I use Netbeans).</p>
<h3>Documentation</h3>
<pre>
----------------------
Magento Module Manager
----------------------
Usage: modman &lt;module&gt; &lt;action&gt; [svn args]
Supported global actions (no module specified):
  init           initialize the current directory as the modman root (no module name)
  update-all     update all modules that are currently checked out

Supported actions: (all svn commands support additional arguments)
  checkout       checkout a new modman compatible module
  export         export a modman compatible module (does real copy instead of symlinks)
  update [...]   update module
  add &lt;svn_path&gt; &lt;real_path&gt;   add a file/dir to the .modman file and working copy
  delete &lt;svn_path&gt;   remove a file/dir from the .modman file and working copy
  status         show status of entire module
  diff [...]     run svn diff on module
  commit [...]   commit changes to module
  info           show the module's working copy path and run svn info on working copy
  list           list the definitions in the .modman file

The repository should contain a file called &quot;.modman&quot; which defines which files
go where relative to the directory where modman was initialized.

If additional arguments are given to commands such as commit, paths
should be relative to the svn root.

---- Start example .modman file ----
# Comments are supported, begin a line with a hash
code                   app/code/local/My/Module/
design                 app/design/frontend/default/default/mymodule/
locale/My_Module.xml   app/locale/en_US/My_Module.xml
My_Module.xml          app/etc/modules/My_Module.xml
---- End example .modman file ----

Author:
Colin Mollenhour

http://colin.mollenhour.com/

colin@mollenhour.com
</pre>
<h3><a href="http://gist.github.com/212246">View Source</a></h3>
<h3><a href="http://gist.github.com/raw/212246/1b301e9aeb9bf83730008ccdb6ecb18651f073f5/modman">Download</a></h3>
<p>Leave a comment if you use it!</p>
]]></content:encoded>
			<wfw:commentRss>http://colin.mollenhour.com/2009/10/17/module-manager-for-when-svnexternals-just-doesnt-cut-it/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Setup an SVN repo on a school server</title>
		<link>http://colin.mollenhour.com/2008/09/17/setup-an-svn-repo-on-a-school-server/</link>
		<comments>http://colin.mollenhour.com/2008/09/17/setup-an-svn-repo-on-a-school-server/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 06:54:47 +0000</pubDate>
		<dc:creator>colin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://colin.mollenhour.com/?p=7</guid>
		<description><![CDATA[I like Subversion, and think it is useful for the various group projects I&#8217;ve done at the University of Tennessee in the EECS department. I figured some other students on a unix-based network with limited privileges might also, and could use a quick tutorial for setting up Subversion on one member&#8217;s user account in such [...]]]></description>
			<content:encoded><![CDATA[<p>I like Subversion, and think it is useful for the various group projects I&#8217;ve done at the University of Tennessee in the EECS department. I figured some other students on a unix-based network with limited privileges might also, and could use a quick tutorial for setting up Subversion on one member&#8217;s user account in such a way that is secure, doesn&#8217;t require labstaff adding any groups, and is still easy for fellow classmates to access while maintaining user identity in the Subversion logs. The only downside is one user has to be the host, so everyone run <strong>quota</strong> and the sucker with the most free space gets to host the repository&#8230; :(</p>
<p><span id="more-7"></span></p>
<h1>Repository Setup</h1>
<p>In this tutorial, the host&#8217;s login is larry, and the group members&#8217; logins are curly and moe. How original&#8230;</p>
<p>First, choose a location to host your repos. You may want more than one in which case it would be good to place them all in the same location. I chose &#8220;.repos&#8221; in my home directory since I should rarely access it directly and no other users will ever access it directly. The name of this first repository will be dmtask1, but you could make additional ones as well, and with different user access rules (more later).</p>
<pre lang="bash">~&gt; whoami
larry
~&gt; mkdir .repos
~&gt; svnadmin create ~/.repos/dmtask1
~&gt; cd .ssh
~/.ssh&gt; ssh-keygen -t rsa -N '' -C 'curly_dmtask1_SVN_only' -f ./id_rsa.curly_dmtask1
~/.ssh&gt; ssh-keygen -t rsa -N '' -C 'moe_dmtask1_SVN_only' -f ./id_rsa.moe_dmtask1</pre>
<p>At this point you have created your first svn repository inside your home directory. By default it should be only readable and writable by your user (drwx&#8212;&#8212;). Do not mess with the permissions, just leave them alone.</p>
<p>Also, you have created some public/private key pairs for the two users that we are allowing access to, but we are not done here yet. Send each respective user their private key file (id_rsa.*_dmtask1) via email or preferably some more secure method since those files will allow password-less access to the svn repository.</p>
<pre lang="bash">~/.ssh&gt; echo -n 'command="svnserve -t --tunnel-user=curly -r /home/<MYUSER>/.repos/dmtask1",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty ' &gt;&gt; authorized_keys
~/.ssh&gt; cat id_rsa.curly_dmtask1.pub &gt;&gt; authorized_keys
~/.ssh&gt; echo -n 'command="svnserve -t --tunnel-user=moe -r /home/<MYUSER>/.repos/dmtask1",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty ' &gt;&gt; authorized_keys
~/.ssh&gt; cat id_rsa.moe_dmtask1.pub &gt;&gt; authorized_keys
~/.ssh&gt; chmod 0600 authorized_keys</pre>
<p>Now you&#8217;ve added the public keys for both users to your authorized_keys file so that they can login to your Linux account without a password. Wait.. What?! Actually, the <strong>command=&#8221;svnserve -t &#8211;tunnel-user=curly&#8221;,no-&#8230;</strong> part tells ssh to run the svnserve command in tunnel mode with the specified user, and not allow any other activity over the ssh session, so you are safe (I think.. I take no responsibility for any security risks blah blah blah&#8230;).</p>
<p>Guess what? You&#8217;re actually done already. That was easy.</p>
<h1>Client Setup &#8211; Linux</h1>
<p>Ok, now it is time for the clients (your classmates) to do some work.</p>
<p>First get that private key file from the host, say it is called <strong>id_rsa.curly_dmtask1</strong></p>
<pre lang="bash">~&gt; whoami
curly
~&gt; mv &lt;path_to_file&gt;/id_rsa.curly_dmtask1 ~/.ssh/
~&gt; chmod 0600 .ssh/id_rsa.curly_dmtask1</pre>
<p>Now, setup your environment to force the svn client to use that private key. You will do this with the <strong>SVN_SSH</strong> environment variable. The first command below sets it once. The second will add it to your is to your shell&#8217;s <strong>.*rc</strong> file: e.g. .bashrc, .zshrc, etc..</p>
<pre lang="bash">~&gt; export SVN_SSH="ssh -i $HOME/.ssh/id_rsa.curly_dmtask1"
~&gt; echo "export SVN_SSH=\"ssh -i $HOME/.ssh/id_rsa.curly_dmtask1\"" &gt;&gt; ~/.`basename $SHELL`rc</pre>
<p>You should now be ready to access the svn repository! Here&#8217;s how</p>
<pre lang="bash">~&gt; svn checkout svn+ssh://larry@$HOST/@ dmtask1
~&gt; cd dmtask1
~/dmtask1&gt; cat &gt; test_file
This is a test!
&lt;CTRL+D&gt;
~/dmtask1&gt; svn add test_file
~/dmtask1&gt; svn commit -m "Just testing..."</pre>
<p>The first command will checkout the repository from the root directory into a new folder in the current working directory named <strong>dmtask1</strong>. Notice that this command includes <strong>larry@</strong>, which specifies the host&#8217;s username, not yours. Don&#8217;t worry, any svn commands you carry out in this working copy will be done under your credentials, not the host&#8217;s (the &#8211;tunnel-user option accomplishes this).</p>
<h1>Client Setup &#8211; Windows</h1>
<p>If you are accessing an svn repo from windows then you <del>are most likely</del> should be doing it through <a href="http://subversion.tigris.org/">TortoiseSVN</a>. See <a href="http://tortoisesvn.net/ssh_howto">this page</a> for some good instructions on configuring your machine to work with this repository setup.</p>
<h3>Sources</h3>
<p><a href="http://svnbook.red-bean.com/en/1.4/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.sshauth">Official SVN Book</a></p>
<p><a href="http://blog.uberweiss.net/2007/05/18/svn-ssh">svn+ssh &#8211; Some Random Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://colin.mollenhour.com/2008/09/17/setup-an-svn-repo-on-a-school-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
