<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>svn &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/svn/</link>
	<description>Feed of posts on WordPress.com tagged "svn"</description>
	<pubDate>Wed, 25 Nov 2009 11:20:44 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Managing and Updating Distributions Using SVN]]></title>
<link>http://iomes.wordpress.com/2009/11/25/managing-and-updating-distributions-using-svn/</link>
<pubDate>Wed, 25 Nov 2009 08:40:39 +0000</pubDate>
<dc:creator>iomes</dc:creator>
<guid>http://iomes.wordpress.com/2009/11/25/managing-and-updating-distributions-using-svn/</guid>
<description><![CDATA[I&#8217;ve just experimented with subversion and made sure I can propagate modifications to other di]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I&#8217;ve just experimented with subversion and made sure I can propagate modifications to other distributions. This is basically using the merge function in subversion. My first test is very pleasing.</p>
<p>The developmment procedure is as follows.</p>
<p>1. The release distribution is used for generating the downloadable distributions on source forge and google code</p>
<p>2. Any testing or support calls are investigated using the maintenannce distribution.</p>
<p>3. Development modifications once accepted should be merged with the release and maintenance distributions</p>
<p>Any changes should be merged to the</p>
<p>Release distribution at</p>
<p>https://iome.svn.sourceforge.net/svnroot/iome/trunk/</p>
<p>Release distribution on google code at</p>
<p><strong><em>https</em></strong>://iome.googlecode.com/svn/trunk</p>
<p>Development distribution at</p>
<p>https://iome.svn.sourceforge.net/svnroot/iome/branches/dev</p>
<p><strong><em><br />
</em></strong></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Build and Publish .NET with MSBUILD with Powershell - Part 1]]></title>
<link>http://consoleart.wordpress.com/2009/11/24/build-and-publish-net-with-msbuild-with-powershell-part-1/</link>
<pubDate>Tue, 24 Nov 2009 08:51:24 +0000</pubDate>
<dc:creator>consoleart</dc:creator>
<guid>http://consoleart.wordpress.com/2009/11/24/build-and-publish-net-with-msbuild-with-powershell-part-1/</guid>
<description><![CDATA[This post will explain the process of automating your build / publish (web or windows) with windows ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This post will explain the process of automating your build / publish (web or windows) with windows Powershell and MSBUILD</p>
<p>What I use ?<br />
1) MSBUILD<br />
2) VS 2008 &#8211; The sample that i will provide will depend upon a windows application and a web application<br />
3) Powershell &#8211; ease of scripting, next generation script for windows, search for Windows Powershell to learn more<br />
4) SVN &#8211; Source code repos (you can alternatively use any source code repos for integrating)</p>
<p>Before you Start(I mean : prerequisites)<br />
1) Install MSBUILD &#8211; (if you already don&#8217;t have it)<br />
2) open PowerShell and type &#8211; MSBUILD, you must see something like this<br />
Microsoft (R) Build Engine Version 3.5.21022.8<br />
[Microsoft .NET Framework, Version 2.0.50727.1433]<br />
Copyright (C) Microsoft Corporation 2007. All rights reserved.</p>
<p>MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.</p>
<p>&#8211;if you get this then you have MSBUILD properlly installed<br />
&#8211; if not then you probably must add the Env. Variables &#8211; to do this &#8211; right click my computer &#8211;&#62; props &#8211;&#62; Env. variables &#8211;&#62; select path and add &#8220;C:\WINDOWS\Microsoft.NET\Framework\v3.5&#8243; (for vs2008 installations, this might differ for vs2005 as it uses the 2.0 framework)<br />
3) Make sure you have MSBUILD community tasks &#8211; its a freely available over the net&#8230;<br />
4) SVN &#8211; a source code control management<br />
5) I Tunes or any other music player &#8211; a good collection of songs &#8211; my favorite was OST &#8211; Batman, The Dark kinght .</p>
<p>ok, this is how it works<br />
MSBUILD is blah blah blah, there is already enuf said abt this throughout the net&#8230;<br />
We need to give a solution file / .proj file with some target specified to msbuild to perform the BUILD. So create a fine named yourproject.proj, copy the following contents to it&#8230;<br />
&#60;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&#62;  </p>
<p>&#60;Project DefaultTargets=&#8221;Build&#8221; xmlns=&#8221;http://schemas.microsoft.com/developer/msbuild/2003&#8243;&#62;<br />
  &#60;Import Project=&#8221;$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets&#8221;/&#62;  </p>
<p>  &#60;PropertyGroup&#62;<br />
	&#60;Major&#62;2&#60;/Major&#62;<br />
    &#60;Minor&#62;2&#60;/Minor&#62;<br />
    &#60;Build&#62;0&#60;/Build&#62;<br />
    &#60;Revision&#62;0&#60;/Revision&#62;<br />
  &#60;/PropertyGroup&#62;  </p>
<p>  &#60;ItemGroup&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\.svn\**&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\bin\**&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\obj\**&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\Release\**&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\Debug\**&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\Test\**&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\TestResults\**&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\doc\**&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\www\**&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\*.user&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\*.suo&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\*.zip&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\*.txt&#8221; /&#62;<br />
    &#60;DefaultExclude Include=&#8221;**\*.pdb&#8221; /&#62;<br />
  &#60;/ItemGroup&#62;  </p>
<p>  &#60;PropertyGroup&#62;<br />
    &#60;SourceFileRootFolder&#62;TODO: YOUR WORKING FOLDER PATH&#60;/SourceFileRootFolder&#62;<br />
    &#60;WebFolder&#62;TODO: YOUR WEB SITE DIRECTORY FOLDER PATH&#60;/WebFolder&#62;<br />
    &#60;ReleaseFolder&#62;TODO: GIVE THE PATH OF THE PUBLISH FOLDER(C:\PublishedSource&#60;/ReleaseFolder&#62;<br />
  &#60;/PropertyGroup&#62;</p>
<p>  &#60;ItemGroup&#62;<br />
    &#60;ZipFiles Include=&#8221;../MyProject/bin/Release/*.*;&#8221; Exclude=&#8221;@(DefaultExclude)&#8221; /&#62;<br />
  &#60;/ItemGroup&#62;  </p>
<p> &#60;ItemGroup&#62;<br />
    &#60;DefaultBinFiles Include=&#8221;$(SourceFileRootFolder)\DefaultBinFiles\*.*&#8221;/&#62;<br />
    &#60;ProjectBinFiles Include=&#8221;$(SourceFileRootFolder)\$(WebFolder)\bin\*.*&#8221;/&#62;<br />
  &#60;/ItemGroup&#62;</p>
<p>  &#60;Target Name=&#8221;Compile&#8221;&#62;<br />
	&#60;MSBuild Projects=&#8221;../MyProject/MyProject.csproj&#8221;  Properties=&#8221;Configuration=Release&#8221; /&#62;<br />
  &#60;/Target&#62;  </p>
<p>  &#60;Target Name=&#8221;CleanSource&#8221;&#62;<br />
    &#60;Message Text=&#8221;Removing all source files from $(ReleaseFolder)&#8221; /&#62;<br />
    &#60;RemoveDir Directories=&#8221;$(ReleaseFolder)&#8221; /&#62;<br />
  &#60;/Target&#62; </p>
<p>  &#60;Target Name=&#8221;PublishWeb&#8221; DependsOnTargets=&#8221;Mimify&#8221;&#62;<br />
    &#60;MSBuild Projects=&#8221;$(SourceFileRootFolder)\$(WebFolder)\WebProject.csproj&#8221; Targets=&#8221;Clean;Build&#8221; /&#62;<br />
    &#60;CallTarget Targets=&#8221;CleanSource&#8221;/&#62;<br />
    &#60;MSBuild Projects=&#8221;$(SourceFileRootFolder)\$(WebFolder)\WebProject.csproj&#8221;  Targets=&#8221;_CopyWebApplication;_BuiltWebOutputGroupOutput&#8221;  Properties=&#8221;OutDir=$(ReleaseFolder)\&#8221; &#62;&#60;/MSBuild&#62;<br />
    &#60;Copy SourceFiles=&#8221;@(DefaultBinFiles)&#8221; DestinationFolder=&#8221;$(ReleaseFolder)\$(WebFolder)\bin\&#8221;&#62;&#60;/Copy&#62;<br />
    &#60;Copy SourceFiles=&#8221;@(ProjectBinFiles)&#8221; 	DestinationFolder=&#8221;$(ReleaseFolder)\$(WebFolder)\bin\&#8221;&#62;&#60;/Copy&#62;<br />
  &#60;/Target&#62;</p>
<p>  &#60;Target Name=&#8221;BuildWeb&#8221; DependsOnTargets=&#8221;PublishWeb&#8221;&#62;<br />
    &#60;Message Text=&#8221;Build of web application complete&#8221;/&#62;<br />
  &#60;/Target&#62;  </p>
<p>  &#60;Target Name=&#8221;Zip&#8221;  DependsOnTargets=&#8221;Compile&#8221;&#62;<br />
    &#60;Zip Files=&#8221;@(ZipFiles)&#8221; ZipFileName=&#8221;SOMENAME.v$(Major).$(Minor).$(Build).$(Revision).zip&#8221; /&#62;<br />
  &#60;/Target&#62;</p>
<p>  &#60;Target Name=&#8221;BuildTool&#8221; DependsOnTargets=&#8221;Zip&#8221;&#62;<br />
    &#60;Message Text=&#8221;Tool build completed&#8221;/&#62;<br />
  &#60;/Target&#62;<br />
  &#60;UsingTask<br />
        TaskName=&#8221;CompressorTask&#8221;<br />
        AssemblyFile=&#8221;Yahoo.Yui.Compressor.dll&#8221; /&#62;<br />
    &#60;PropertyGroup&#62;<br />
        &#60;CssOutputFile Condition=&#8221; &#8216;$(CssOutputFile)&#8217;==&#8221; &#8220;&#62;SylesSheetFinal.css&#60;/CssOutputFile&#62;<br />
        &#60;JavaScriptOutputFile Condition=&#8221; &#8216;$(JavaScriptOutputFile)&#8217;==&#8221; &#8220;&#62;$(SourceFileRootFolder)\$(WebFolder)\myjs\&#60;/JavaScriptOutputFile&#62;<br />
    &#60;/PropertyGroup&#62;</p>
<p>   &#60;Target Name=&#8221;Mimify&#8221;&#62;<br />
        &#60;!&#8211;<br />
            ItemGroup\CssFiles or ItemGroup\JavaScriptFiles: add zero to many files you wish to include in this compression task.<br />
                                                             Don&#8217;t forget, you can use the wildcard (eg. *.css, *.js) if you feel up to it.<br />
                                                             Finally, at least one item is required &#8211; either a css file or a js file.</p>
<p>            CssFiles/JavaScriptFiles data format: Please do not touch this.<br />
            DeleteCssFiles: [Optional] True &#124; Yes &#124; Yeah &#124; Yep &#124; True &#124; FoSho &#124; Fo Sho. Default is False. Anything else is False. (eg. blah = false, xxxx111 = false, etc)<br />
            CssCompressionType: YuiStockCompression &#124; MichaelAshsRegexEnhancements &#124; HaveMyCakeAndEatIt or BestOfBothWorlds or Hybrid; Default is YuiStockCompression.<br />
            ObfuscateJavaScript: [Optional] refer to DeleteCssFiles, above.<br />
            PreserveAllSemicolons: [Optional] refer to DeleteCssFiles, above.<br />
            DisableOptimizations: [Optional] refer to DeleteCssFiles, above.<br />
            EncodingType: [Optional] ASCII, BigEndianUnicode, Unicode, UTF32, UTF7, UTF8, Default. Default is &#8216;Default&#8217;.<br />
            DeleteJavaScriptFiles: [Optional] refer to DeleteCssFiles, above.<br />
            LineBreakPosition: [Optional] the position where a line feed is appened when the next semicolon is reached. Default is -1 (never add a line break).<br />
                               0 (zero) means add a line break after every semicolon. (This might help with debugging troublesome files).<br />
            LoggingType: None &#124; ALittleBit &#124; HardcoreBringItOn;  Hardcore also lists javascript verbose warnings, if there are any (and there usually is <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ).<br />
            ThreadCulture: [Optional] the culture you want the thread to run under. Default is &#8216;en-gb&#8217;.<br />
            IsEvalIgnored: [Optional] compress any functions that contain &#8216;eval&#8217;. Default is False, which means a function that contains<br />
                           &#8216;eval&#8217; will NOT be compressed. It&#8217;s deemed risky to compress a function containing &#8216;eval&#8217;. That said,<br />
                           if the usages are deemed safe this check can be disabled by setting this value to True.<br />
        &#8211;&#62;<br />
        &#60;ItemGroup&#62;<br />
            &#60;JavaScriptFiles Include=&#8221;$(SourceFileRootFolder)\$(WebFolder)\Javascript\*.js&#8221; /&#62;<br />
            &#60;CSSFiles Include=&#8221;$(SourceFileRootFolder)\$(WebFolder)\Themes\*.css&#8221; /&#62;<br />
        &#60;/ItemGroup&#62;<br />
        &#60;CompressorTask<br />
            DeleteCssFiles=&#8221;false&#8221;<br />
            CssOutputFile=&#8221;%(CSSFiles.Identity)&#8221;<br />
            CssCompressionType=&#8221;YuiStockCompression&#8221;<br />
            JavaScriptFiles=&#8221;@(JavaScriptFiles)&#8221;<br />
			CSSFiles=&#8221;@(CSSFiles)&#8221;<br />
            ObfuscateJavaScript=&#8221;True&#8221;<br />
            PreserveAllSemicolons=&#8221;False&#8221;<br />
            DisableOptimizations=&#8221;Nope&#8221;<br />
            EncodingType=&#8221;Default&#8221;<br />
            DeleteJavaScriptFiles=&#8221;false&#8221;<br />
            LineBreakPosition=&#8221;-1&#8243;<br />
            JavaScriptOutputFile=&#8221;%(JavaScriptFiles.Identity)&#8221;<br />
            LoggingType=&#8221;ALittleBit&#8221;<br />
            ThreadCulture=&#8221;en-au&#8221;<br />
            IsEvalIgnored=&#8221;false&#8221;<br />
            /&#62;<br />
    &#60;/Target&#62;</p>
<p>&#60;/Project&#62;</p>
<p>Change your relevant project details in it &#8211; i have placed TODO: to specify what has to be done.</p>
<p><strong>There are lot of targets specified in my .proj fle</strong><br />
Compile &#8211; compiles the source files<br />
PublishTool &#8211; publishes the windows application<br />
PublishWeb &#8211; publishes the web application<br />
Mimify &#8211; Obfuscate Javascript and CSS files &#8211; uses external dll, freely available on net</p>
<p>I have several things in my build project&#8230;like for example all my JAVASCRIPT and CSS will be obfuscated during the publish time so that i don&#8217;t allow anyone to re-engineer my JS logic&#8230;</p>
<p><strong>Execute the build</strong><br />
To execute the build<br />
1) open powershell / command prompt<br />
2) msbuild.exe c:\whereever\yourproject.proj (remember the target file we created in the previous step)<br />
you can provide a target as<br />
msbuild.exe c:\whereever\yourproject.proj /t:Publishweb</p>
<p>so its pretty much of it&#8230;any questions please feel free to email me &#8211; consoleart@gmail.com</p>
<p>in my next article we shall see how to automate the build process&#8230;</p>
<p>These concepts may be little old, but there are several projects who are struggling with build automation, may be this article will help them to provide a bit of understanding&#8230;</p>
<p>thnx to the people who have shown me that there are several tools that exists to make our life easier&#8230;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[KDE 4.4 includerà il supporto a PulseAudio per Phonon]]></title>
<link>http://gianmichele.wordpress.com/2009/11/24/kde-4-4-includera-il-supporto-a-pulseaudio-per-phonon/</link>
<pubDate>Tue, 24 Nov 2009 08:43:45 +0000</pubDate>
<dc:creator>gianmichele</dc:creator>
<guid>http://gianmichele.wordpress.com/2009/11/24/kde-4-4-includera-il-supporto-a-pulseaudio-per-phonon/</guid>
<description><![CDATA[Tra le feature previste per KDE 4.4 ce n’è una in particolare che merita una maggiore attenzione: Co]]></description>
<content:encoded><![CDATA[Tra le feature previste per KDE 4.4 ce n’è una in particolare che merita una maggiore attenzione: Co]]></content:encoded>
</item>
<item>
<title><![CDATA[Configure SVN with Apache - Windows Server / XP]]></title>
<link>http://consoleart.wordpress.com/2009/11/24/configure-svn-with-apache-windows-server-xp/</link>
<pubDate>Tue, 24 Nov 2009 04:49:49 +0000</pubDate>
<dc:creator>consoleart</dc:creator>
<guid>http://consoleart.wordpress.com/2009/11/24/configure-svn-with-apache-windows-server-xp/</guid>
<description><![CDATA[I googled a lot about configuring SVN repository with Apache server and thought that I should write ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I googled a lot about configuring SVN repository with Apache server and thought that I should write my experience on how i succeeded in configuring it</p>
<p><strong>A Preface:</strong><br />
I earlier used SVN server with IIS by running a SVN service, it really messed up a lot(or atleast with the info that I had) and most of the time I happen to netwrk-share my SVN repos directory and connect from other machines, then we decided to move our SVN to a apache web server&#8230;so here is the configuration details&#8230;</p>
<p><strong>What you need ?</strong><br />
1) Apache 2.x<br />
2) SVN<br />
3) Tortoise SVN Client</p>
<p>1) Install apache &#8211; you can change the default port number(80) if you have IIS running on that machine.<br />
http://httpd.apache.org/download.cgi<br />
2) Install SVN &#8211; i used this MSI for installation Setup-Subversion-1.6.4.msi<br />
3) Install Tortoise SVN &#8211; On the client machine &#8211; we dont need this on teh server unless you want to have a working directory(for build purpose, more of this in my next article) on your server<br />
tortoisesvn.net/downloads</p>
<p>&#8211; after all this restart your machine once(not needed if you are using a windows server, if you are using XP then restart is advisable)</p>
<p><strong>Create repository -this is the easiest of all the tasks</strong><br />
Create a directory &#8211; C:\SourceCodeRepos<br />
once you have installed SVN you will find the bin folder contains svnadmin, use this to create a repos<br />
<strong>open command Prompt&#62; svnadmin create &#8220;C:\SourceCodeRepos&#8221; </strong><br />
(if you get an error bad command or filename then add the SVN bin path to the environment variables Mycomputer &#8211;&#62; right click &#8211;&#62; props &#8211;&#62; Env Variables &#8211;&#62; Path &#8211;&#62; Edit &#8211;&#62; dont overwrite the existing one&#8211;&#62; copy the bin path of SVN in the end.)</p>
<p><strong>Configure APACHE &#8211; a little less easier than the prev one</strong><br />
<strong>apache step 1) </strong><br />
Create a folder c:\etc &#8212; this directory will hold the config files of your SVN repos and apache auth files.</p>
<p><strong>Create three files inside this directory (c:\etc)</strong><br />
<strong>a) File name: subversion.conf</strong><br />
Content of the file </p>
<p>  DAV svn<br />
  SVNPath C:\SourceCodeRepos</p>
<p>  AuthType Basic<br />
  AuthName &#8220;Subversion Kinetics repository&#8221;<br />
  AuthUserFile c:/etc/svn-auth-file</p>
<p>  Require valid-user</p>
<p>  AuthzSVNAccessFile c:/etc/svn-acl</p>
<p><strong>b) File Name: svn-acl</strong><br />
Content:<br />
# groups foes here<br />
[groups]<br />
developers = username1,username2,username3</p>
<p># developers group has a read/write access to source code repository<br />
[SourceCodeRepos:/]<br />
@developers = rw<br />
* = r</p>
<p><strong>c) File name: svn-auth-file</strong><br />
no content for this file&#8230;<br />
<strong><br />
apache step 2) </strong><br />
copy the modules &#8220;mod_authz_svn.so&#8221; and &#8220;mod_dav_svn.so&#8221; to your apache modules directory<br />
c:\Program Files\Apache Software Foundation\Apache2.2\modules\<br />
<strong><br />
apache step 3) </strong><br />
Add these lines to you httpd.conf (located at c\Program Files\Apache Software Foundation\Apache2.2\conf)<br />
LoadModule  dav_svn_module modules/mod_dav_svn.so<br />
LoadModule  authz_svn_module modules/mod_authz_svn.so<br />
<strong><br />
apache step 4) </strong>add this line to the end of the same file (httpd.conf)<br />
Include c:/etc/subversion.conf<br />
#this step will load the SVN configuration of our repos to apache</p>
<p><strong>restart your apache server&#8230;</strong></p>
<p>we are almost done&#8230;<br />
the final step is to create usernames and store them in the auth file<br />
here is the step to create username using htpasswd</p>
<p>htpasswd -m &#8220;c:\etc\svn-auth-file&#8221; ausername<br />
a help link is here<br />
http://httpd.apache.org/docs/2.0/programs/htpasswd.html<br />
(the htpasswd is available under the apache directory)</p>
<p>Check the URL by typing<br />
http://localhost/SourceCodeRepos &#8211; you must be prompted with a username and password, if it is so then you have succeeded, congratulations !!</p>
<p>now from any client machine you can access the repos using the url<br />
http://servername/SourceCodeRepos&#8230;<br />
use TortoiseSVN to access the repos URL&#8230;</p>
<p>I will be glad to help you in any step, do let me know&#8230;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Create multi-mode maven projects in Eclipse]]></title>
<link>http://almeidamike.wordpress.com/2009/11/23/create-multi-mode-maven-projects-in-eclipse/</link>
<pubDate>Mon, 23 Nov 2009 18:40:58 +0000</pubDate>
<dc:creator>almeidamike</dc:creator>
<guid>http://almeidamike.wordpress.com/2009/11/23/create-multi-mode-maven-projects-in-eclipse/</guid>
<description><![CDATA[This is a good guide to create multi-mode maven projects in Eclipse: http://maven.apache.org/plugins]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is a good guide to create multi-mode maven projects in Eclipse:</p>
<p><a href="http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html">http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html</a></p>
<p>&#160;</p>
<p>Also useful to refactor existing project to put several modules bellow a parent module that wasn&#8217;t created when it should.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[My First GUI App]]></title>
<link>http://igbanam.wordpress.com/2009/11/23/my-first-gui-app/</link>
<pubDate>Mon, 23 Nov 2009 05:27:25 +0000</pubDate>
<dc:creator>Yasky</dc:creator>
<guid>http://igbanam.wordpress.com/2009/11/23/my-first-gui-app/</guid>
<description><![CDATA[I created my first GUI application about an hour ago. It&#8217;s something that can fix a potential ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I created my first GUI application about an hour ago. It&#8217;s something that can fix a potential human factor problem in the open-source community. If anyone knows how to send tools to the Ubuntu community or SVN (Subversion), comment. I was too excited when it was complete, I wrote a note on Facebook. <a href="http://www.facebook.com/note.php?note_id=199435635208" target="_self">Check it out</a>.</p>
<p>Application Name: Gold<br />
Purpose: Visualize differences in <em>&#8220;difference&#8221;</em> files.<br />
Created on: 22/11/09 11:11PM<br />
Works on: MAC OS X and Linux.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Organize your projects in a git repository]]></title>
<link>http://instcode.wordpress.com/2009/11/21/organize-your-projects-in-a-git-repository/</link>
<pubDate>Sat, 21 Nov 2009 09:31:56 +0000</pubDate>
<dc:creator>instcode</dc:creator>
<guid>http://instcode.wordpress.com/2009/11/21/organize-your-projects-in-a-git-repository/</guid>
<description><![CDATA[My current problem is I have quite a lot of projects and they are either under active development or]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>My current problem is I have quite a lot of projects and they are either under active development or developed in the past but only a few projects are kept in version control (Google Code SVN). Now I need a local VCS that helps me to keep track of changes of all those projects.</p>
<p>The first VCS candidate comes in mind, a centralized VCS, that is SVN. It&#8217;s not hard to organize my projects in an SVN repository:</p>
<pre>Repository
&#124;_ trunk
&#124;     &#124;_ Project-A
&#124;     &#124;      &#124;_ README
&#124;     &#124;      &#124;_ ...
&#124;     &#124;
&#124;     &#124;_ Project-B
&#124;     &#124;      &#124;_ trunk
&#124;     &#124;      &#124;      &#124;_ LICENSE
&#124;     &#124;      &#124;      &#124;_ ...
&#124;     &#124;      &#124;_ branches
&#124;     &#124;      &#124;_ tags
&#124;     &#124;_ ...
&#124;
&#124;_ branches
&#124;_ tags</pre>
<p>This structure represents 2 most common ways to manage multiple projects in an SVN repository. That is, a project may have either monolithic layout (e.g. Project-A) or project structural layout (e.g. Project-B) and all of them can be put in trunk. In order to work on these projects, I simply check them out to my current working folder (e.g. Eclipse workspace):</p>
<blockquote><p>svn checkout /path/to/repository/trunk/Project-A /path/to/workspace/Project-A<br />
svn checkout /path/to/repository/trunk/Project-B/trunk /path/to/workspace/Project-B</p></blockquote>
<p>Now, what I have in my workspace are:</p>
<pre>Workspace
&#124;_ Project-A
&#124;      &#124;_ .svn
&#124;      &#124;_ README
&#124;      &#124;_ ...
&#124;_ Project-B
&#124;       &#124;_ .svn
&#124;       &#124;_ LICENSE
&#124;       &#124;_ ...
&#124;_ ...</pre>
<p>With this directory structure, I can start working on any projects and Eclipse IDE doesn&#8217;t bother to complain anything about wrong projects location. All changes from an individual project would be easily contributed back to the repository by issuing svn commit commands&#8230; And that is what I really want!</p>
<p>So the SVN is fit very well in this situation and I do think for a single developer project, SVN is the best source control out there. However, as you would have heard, git is awesome! Let give it a try&#8230;</p>
<p>How git helps me to reach my goal? How can I keep track of all changes in place? How to organize all those projects in a git repository so I can easily clone them to my workspace later on?</p>
<p>I asked this problem to a guy who claims to be an advanced git user and he told me something like: You had better understand the concepts behind git and forget what central VCS gave you, dude! Oh geeeeze!! I had known &#38; understood git&#8217;s philosophy since I first heard about git on Linus Torvalds talk! It is distributed and content-addressable source control! But here, I just want to know which techniques be used to get my work done! Right now, I have found a few solutions but none of them really have convinced me yet.</p>
<p>Solution 1: Branching ~ very stupid &#38; ugly</p>
<pre>Repository
&#124;_ .git
&#124;     &#124;_ objects
&#124;     &#124;_ refs
&#124;     &#124;    &#124;_ heads
&#124;     &#124;          &#124;_ master
&#124;     &#124;          &#124;_ Project-A
&#124;     &#124;          &#124;_ Project-B
&#124;     &#124;          &#124;_ ...
&#124;     &#124;
&#124;     &#124;_ config
&#124;     &#124;_ ...
&#124;_ ...</pre>
<p>The repository is a big git repository because it holds all of my projects&#8217; data inside. However, again, what I want is a way to clone them, one by one, into my workspace folder. To obtain this, each project should have its own branch and the master branch should be empty all the time so whenever I want to add a project to the repository, I can do:</p>
<ul>
<li>Create a new branch from the empty master.</li>
<li>Name it as the specified project&#8217;s name.</li>
<li>Add that project to that branch.</li>
<li>Commit changes.</li>
</ul>
<p>Quite number of steps but we can do easily though. However, what happens if we try cloning project by project to the workspace folder for working:</p>
<pre>Workspace
&#124;_ Project-A
&#124;       &#124;_ .git
&#124;       &#124;     &#124;_ objects
&#124;       &#124;     &#124;_ refs
&#124;       &#124;     &#124;    &#124;_ heads
&#124;       &#124;     &#124;          &#124;_ master
&#124;       &#124;     &#124;          &#124;_ Project-A
&#124;       &#124;     &#124;          &#124;_ Project-B
&#124;       &#124;     &#124;
&#124;       &#124;     &#124;_ config
&#124;       &#124;     &#124;_ HEAD (content: refs: refs/heads/Project-A)
&#124;       &#124;
&#124;       &#124;_ README
&#124;       &#124;_ ...
&#124;
&#124;_ Project-B
&#124;       &#124;_ .git (HEAD: refs: refs/heads/Project-B)
&#124;       &#124;_ LICENSE
&#124;       &#124;_ ...
&#124;_ ...</pre>
<p>Opps! Each project now carries a whole structural of the original repository with it. The different is the HEAD of each repository refers to a specific *project&#8217;s name* branch whereas the HEAD of the original repository can point to any branch. I know if we specify local repository type in clone command (don&#8217;t remember exactly, though), git will create symbolic links to remote repository instead of replicating it over and over. Actually, my developing environment is mainly on Windows and we still have ability to create symbolic links (junction &#8211; sysinternal) but I doubt if msysgit could do the trick or I have to do it manually and&#8230; repository management explodes! No, I want a solution but I don&#8217;t need this ugly one!</p>
<p>Solution 2: Git Superproject</p>
<p>The superproject serves for another purposes but let&#8217;s see whether it can help. First off, I have to create our project repositories in somewhere (e.g workspace). After that, I go to the central repository and add those repositories as its sub-modules. It is now so called &#8220;super-project&#8221;.</p>
<pre>Workspace
&#124;_ Project-A
&#124;       &#124;_ .git
&#124;       &#124;_ README
&#124;       &#124;_ ...
&#124;
&#124;_ Project-B
&#124;       &#124;_ .git
&#124;       &#124;_ LICENSE
&#124;       &#124;_ ...
&#124;_ ...</pre>
<blockquote><p>git submodule add /path/to/workspace/Project-A Project-A<br />
git submodule add /path/to/workspace/Project-B Project-B</p></blockquote>
<pre>Repository
&#124;_ .git
&#124;_ .gitmodules
&#124;_ Project-A
&#124;       &#124;_ .git
&#124;       &#124;_ README
&#124;       &#124;_ ...
&#124;
&#124;_ Project-B
&#124;       &#124;_ .git
&#124;       &#124;_ LICENSE
&#124;       &#124;_ ...
&#124;_ ...</pre>
<p>Well, if I commit some changes in the workspace projects&#8217; repositories and I want them to be updated in my central repository, I have to go to that repository and do git pull for all sub modules (aha, cronjob script)&#8230; So it still introduces the same problem here: repository management explodes! This time, I even have to do more tedious works that git should be responsible for. Git superproject is absolutely not designed for doing this task!</p>
<p>Solution 3: Individual Project Repository &#8211; Yes, I named it!</p>
<pre>Repository
&#124;_ Project-A.git
&#124;       &#124;_ objects
&#124;       &#124;_ refs
&#124;       &#124;_ config
&#124;       &#124;_ ...
&#124;_ Project-B.git
&#124;       &#124;_ objects
&#124;       &#124;_ refs
&#124;       &#124;_ config
&#124;       &#124;_ ...
&#124;_ ...</pre>
<p>The repository in this case is just a normal directory which contains a bunch of bare git repositories. Each repository is one of my projects. So, if I check out Project-A, or Project-B&#8230; one by one to my workspace folder, I will get this directory structure:</p>
<pre>Workspace
&#124;_ Project-A
&#124;       &#124;_ .git
&#124;       &#124;_ README
&#124;       &#124;_ ...
&#124;
&#124;_ Project-B
&#124;       &#124;_ .git
&#124;       &#124;_ LICENSE
&#124;       &#124;_ ...
&#124;_ ...</pre>
<p>Elegant &#38; straight forward! One big disadvantage is we still cannot keep track of all changes from different projects in place although we can do it for individual project very well. If you had developed a similar type of project like an Eclipse RCP project which comprises of different plugins, and each plugin is an individual Java project, you would have wanted to see all those changes in the parent project rather than the plugin projects! This solution doesn&#8217;t achieve all my wants but I guess I should stick with it anyway. Of course, I will continue seeking for another way and it would be my pleasure to know your solution.</p>
<p>That&#8217;s said, git is not good enough for such kind of demand&#8230; but wait, git guys, I did choose git over svn because it&#8217;s cool, and it makes me cool <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ! Hopefully, as the time being, I can gain more experience in git and who knows, I will blame myself for such a stupid post <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[svn: PROPFIND request failed]]></title>
<link>http://polimetla.com/2009/11/20/svn-propfind-request-failed/</link>
<pubDate>Fri, 20 Nov 2009 18:33:49 +0000</pubDate>
<dc:creator>polimetla</dc:creator>
<guid>http://polimetla.com/2009/11/20/svn-propfind-request-failed/</guid>
<description><![CDATA[Problem Statement: svn: Processing PROPFIND request response failed: Content is not allowed in prolo]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Problem Statement:</strong><br />
svn: Processing PROPFIND request response failed: Content is not allowed in prolog. (/svn/project1/module1)<br />
svn: PROPFIND request failed on &#8216;/svn/project1/module1&#8242;<br />
svn: Processing PROPFIND request response failed: Content is not allowed in prolog. (/svn/project1/module1)<br />
svn: PROPFIND request failed on &#8216;/svn/project1/module1&#8242;<br />
RA layer request failed<br />
svn: PROPFIND of &#8216;/svn/project1/module1&#8242;: 200 OK (http://localserver)</p>
<p><strong>Solution: </strong><br />
Server SVN version is 1.4.8. Client version used is 1.6.6<br />
After uninstalling 1.6.6 and installing 1.4.8 all issues resolved.</p>
<p style="text-align:center;">-o-</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Klasser och SVN]]></title>
<link>http://joabo448.wordpress.com/2009/11/19/klasser-och-svn/</link>
<pubDate>Thu, 19 Nov 2009 15:07:25 +0000</pubDate>
<dc:creator>joabo448</dc:creator>
<guid>http://joabo448.wordpress.com/2009/11/19/klasser-och-svn/</guid>
<description><![CDATA[Spenderade 1½ timme idag på att implementera några grundläggande klasser, däribland Game klassen och]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Spenderade 1½ timme idag på att implementera några grundläggande klasser, däribland Game klassen och Play_Game &#8220;statet&#8221;. Vi har även kontrollerat att vårt repository finns och laddat upp filerna på denna.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Head to head comparison between Subversion, Git and Mercurial]]></title>
<link>http://animeshdas.wordpress.com/2009/11/19/head-to-head-comparison-between-subversion-git-and-mercurial/</link>
<pubDate>Thu, 19 Nov 2009 14:51:02 +0000</pubDate>
<dc:creator>Animesh Das</dc:creator>
<guid>http://animeshdas.wordpress.com/2009/11/19/head-to-head-comparison-between-subversion-git-and-mercurial/</guid>
<description><![CDATA[View this document on Scribd]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><object id="22758516" name="22758516" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" height="500" width="100%">
<param name="movie" value="http://documents.scribd.com/ScribdViewer.swf?document_id=22758516&access_key=key-1ekb6845ynffe0mxdypi&page=&version=1&auto_size=true&viewMode="><param name="quality" value="high"><param name="play" value="true"><param name="loop" value="true"><param name="scale" value="showall"><param name="wmode" value="opaque"><param name="devicefont" value="false"><param name="bgcolor" value="#ffffff"><param name="menu" value="true"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="salign" value="">
<embed src="http://documents.scribd.com/ScribdViewer.swf?document_id=22758516&access_key=key-1ekb6845ynffe0mxdypi&page=&version=1&auto_size=true&viewMode=" name="22758516_object" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" align="middle"  height="500" width="100%"></embed>
</object>
<div style="font-size:10px;text-align:center;width:100%"><a href="http://www.scribd.com/doc/22758516">View this document on Scribd</a></div> 
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Check out a Maven Project from SVN in Eclipse]]></title>
<link>http://ykyuen.wordpress.com/2009/11/19/check-out-a-maven-project-from-svn-in-eclipse/</link>
<pubDate>Thu, 19 Nov 2009 01:23:31 +0000</pubDate>
<dc:creator>ykyuen</dc:creator>
<guid>http://ykyuen.wordpress.com/2009/11/19/check-out-a-maven-project-from-svn-in-eclipse/</guid>
<description><![CDATA[We did talk about how to use Maven in Eclipse. So let&#8217;s move on to see how to integrate SVN an]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>We did talk about how to use <font color="#003399">Maven</font> in <font color="#003399">Eclipse</font>. So let&#8217;s move on to see how to integrate <font color="#003399">SVN</font> and <font color="#003399">Maven</font> in <font color="#003399">Eclipse</font>.</p>
<p>For a simple <font color="#003399">Java</font> project, only the <font color="#FF00FF">/src</font> folder and the <font color="#FF00FF">pom.xml</font> are needed to be stored in <font color="#FF00FF">SVN repository</font>. if you like to do development without the IDE. u can just check out the project to the file system of a computer with <font color="#003399">Maven</font> installed and run the <font color="#003399">Maven</font> commands in <strong>command prompt/terminal</strong>.</p>
<p>For <font color="#003399">Eclipse user</font>, assume we have already import them in the <font color="#003399">SVN repository</font>. How could we check out them in <font color="#003399">Eclipse</font> such that developers can run the project immediately after check out? </p>
<p><font color="#996633">Pre-requisites<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
1. Eclipse with subclipse and m2clipse installed<br />
2. Maven installed</font></p>
<hr />
<p><strong>Check out the Maven Project in Eclipse<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</strong><br />
1. An optional plugin <font color="#0000FF">Maven SCM handler for Subclipse</font> is needed for <font color="#003399">Eclipse</font>.<br />
<a href="http://ykyuen.wordpress.com/files/2009/11/m2eclipse-and-subckipse.png"><img src="http://ykyuen.wordpress.com/files/2009/11/m2eclipse-and-subckipse.png" alt="" title="m2eclipse and subckipse" width="550" height="373" class="alignleft size-full wp-image-753" /></a></p>
<p>2. Open the <font color="#003399">SVN Repository View</font> in <font color="#003399">Eclipse</font></p>
<p>3. Connected to your <font color="#003399">SVN repositoy</font></p>
<p>4. Selected the <font color="#003399">Maven Project</font> and choose <font color="#FF0000">Check out as Maven Project&#8230;</font><br />
<a href="http://ykyuen.wordpress.com/files/2009/11/check-out-as-maven-project.png"><img src="http://ykyuen.wordpress.com/files/2009/11/check-out-as-maven-project.png" alt="" title="Check out as Maven Project" width="383" height="520" class="alignleft size-full wp-image-754" /></a><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
5. After check out, you may need to configure the project build path to your desired <font color="#33FF33">JDK</font> instead of the <font color="#003399">Eclipse</font> default <font color="#33FF33">JRE</font>.</p>
<p>6. <font color="#FF0000">mvn build/install</font> the project once. Then open the <font color="#003399">Team Synchronizing</font> perspective and add all those <font color="#003399">Eclipse</font> related files such as <font color="#FF00FF">.settings</font> and the <font color="#003399">Maven</font> created folders like <font color="#FF00FF">/target</font> to <font color="#003399">SVN ignore</font>.</p>
<p>Done =)</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Visual Studio and SVN]]></title>
<link>http://bryandallen.wordpress.com/2009/11/16/visual-studio-and-svn/</link>
<pubDate>Mon, 16 Nov 2009 21:39:13 +0000</pubDate>
<dc:creator>Bryan Allen</dc:creator>
<guid>http://bryandallen.wordpress.com/2009/11/16/visual-studio-and-svn/</guid>
<description><![CDATA[I recently converted over to using SVN for source control for all my projects at work.  I&#8217;ve b]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I recently converted over to using SVN for source control for all my projects at work.  I&#8217;ve been using it at home for over a year now.  So far&#8230;..its great!  I&#8217;m primarily using Visual Studio 2008 so I needed something that would integrate cleanly, but I also wanted something that could be used by multiple platforms since I&#8217;m looking into developing for the Mac and iPhone soon.  In addition, our budget is very limited so I needed a free solution.</p>
<p>Solution:</p>
<p>VisualSVN Server:   <a title="VisualSVN Server" href="http://www.visualsvn.com/server/">http://www.visualsvn.com/server/</a></p>
<ul>
<li>Easy to install SVN Server for Windows that is free if you don&#8217;t have any advanced server needs.</li>
</ul>
<p>AnkhSVN:  <a title="AnkhSVN" href="http://ankhsvn.open.collab.net/">http://ankhsvn.open.collab.net/</a></p>
<ul>
<li>Free Subversion SourceControl Provider for Visual Studio 2008.</li>
<li>Super fast, easy to integrate with existing projects, and very clean implementation.</li>
</ul>
<p>TortoiseSVN:  <a href="http://tortoisesvn.tigris.org/">http://tortoisesvn.tigris.org/</a></p>
<ul>
<li>Integrates SVN into the shell and makes it easy to add whatever I want to source control, even if  its not in a Visual Studio project.  I used TortoiseCVS at SAS a few years ago so I figured TortoiseSVN would be of similar quality.</li>
</ul>
<p>JIRA, Fisheye, and Greenhopper Starter:  <a title="Atlassian Starter" href="http://www.atlassian.com/starter/">http://www.atlassian.com/starter/</a></p>
<ul>
<li>Issue tracking, source control management and visualization, change tracking, and agile project management.</li>
<li>The starter licenses are $10 each for these so the price is definitely right.  We do have a little bit of budget here and $30 is nothing.  We&#8217;re a very small team so the starter licenses are perfect for us.</li>
<li>I&#8217;m just now getting this all up to speed and still in the evaluation phase, but the change tracking and issue management are top notch and installation and integration with VisualSVN server were pretty painless if you know anything about Java web applications.  I just needed to throw a little more RAM at my instances of Tomcat and its all running flawlessly now.</li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux - Cliente SVN mais "amigável" ]]></title>
<link>http://chevitarese.wordpress.com/2009/11/16/linux-cliente-svn-mais-amigavel/</link>
<pubDate>Mon, 16 Nov 2009 15:34:16 +0000</pubDate>
<dc:creator>fchevitarese</dc:creator>
<guid>http://chevitarese.wordpress.com/2009/11/16/linux-cliente-svn-mais-amigavel/</guid>
<description><![CDATA[Opa!!! Eu trabalho com desenvolvimento, e por consequência, tenho que lidar com alguns projetos que ]]></description>
<content:encoded><![CDATA[Opa!!! Eu trabalho com desenvolvimento, e por consequência, tenho que lidar com alguns projetos que ]]></content:encoded>
</item>
<item>
<title><![CDATA[SVN - Comandos]]></title>
<link>http://progarquivos.wordpress.com/2009/11/14/svn-comandos/</link>
<pubDate>Sat, 14 Nov 2009 22:00:12 +0000</pubDate>
<dc:creator>progarquivos</dc:creator>
<guid>http://progarquivos.wordpress.com/2009/11/14/svn-comandos/</guid>
<description><![CDATA[svnadmin create NOMEPROJETO svn mkdir file:///caminho/svn/projeto/trunk chown -R www-data.www-data /]]></description>
<content:encoded><![CDATA[svnadmin create NOMEPROJETO svn mkdir file:///caminho/svn/projeto/trunk chown -R www-data.www-data /]]></content:encoded>
</item>
<item>
<title><![CDATA[N-way Git synchronization with extra cheese]]></title>
<link>http://l0b0.wordpress.com/2009/11/14/n-way-git-synchronization-with-extra-cheese/</link>
<pubDate>Sat, 14 Nov 2009 16:18:06 +0000</pubDate>
<dc:creator>l0b0</dc:creator>
<guid>http://l0b0.wordpress.com/2009/11/14/n-way-git-synchronization-with-extra-cheese/</guid>
<description><![CDATA[Index Background Converting Subversion to Git svn2git.sh Generate and version .gitignore files exclu]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h2>Index</h2>
<ol>
<li><a href="#background">Background</a></li>
<li><a href="#git-svn">Converting Subversion to Git</a>
<ul>
<li><a href="#svn2git">svn2git.sh</a></li>
</ul>
</li>
<li><a href="#git-ignore">Generate and version .gitignore files</a>
<ul>
<li><a href="#exclude2gitignore">exclude2gitignore.sh</a></li>
</ul>
</li>
<li><a href="#git-proxy">Git via proxy</a></li>
<li><a href="#pull-remote">Setting up pull everywhere</a></li>
<li><a href="#references">References</a></li>
</ol>
<h2><a name="background">Background</a></h2>
<p>I&#8217;ve got a desktop and server behind a router with a dynamic <abbr title="Internet Protocol">IP</abbr> address at home, a desktop at work, and a laptop that floats around. I&#8217;d very much like to have the same settings on all of them, and to be able to synchronize them as easily as possible. I&#8217;ve been using Subversion for this, but recent trouble with <a href="http://subversion.tigris.org/ds/viewMessage.do?dsMessageId=2415865&#38;dsForumId=1065">symlinks</a> and a long-term concern that storing the revision history centrally (even with backups now and then) is a Bad Move in the long term. So when I had to start using Git at <a href="http://library.web.cern.ch/library/">work</a>, and after realizing that it could solve both problems (at least in theory), I tried figuring out how to do this. After lots of tries followed by <code>rm -rf settings/</code>, I think I&#8217;ve got a working setup. Of course, I don&#8217;t guarantee that any of this will work for you.</p>
<h2><a name="git-svn">Converting Subversion to Git</a></h2>
<p>Install the necessary software:<br />
<code>sudo apt-get install git-svn</code></p>
<p>Copy the following code into a file named <em>svn2git.sh</em>, and run it as documented below.</p>
<h3><a name="svn2git">svn2git.sh</a></h3>
<pre class="brush: bash;">#!/bin/sh
#
# NAME
#    svn2git.sh - Convert a Subversion repository to Git
#
# SYNOPSIS
#    svn2git.sh [options] &#60;Subversion URL&#62;
#
# OPTIONS
#    --authors=path  Authors file
#    -v,--verbose    Verbose output
#
# EXAMPLE
#    /path/to/svn2git.sh https://example.org/foo
#
#    Create authors file for repository
#
#    /path/to/svn2git.sh -v --authors=authors.txt https://example.org/foo
#
#    Get Subversion repository to ./foo.git
#
# DESCRIPTION
#    Two-part script to migrate from Subversion to Git. First it tries to get
#    a list of the Subversion authors, so it can be formatted to fit the Git
#    commit structure. When running with the authors file, it will fetch the
#    entire Subversion revision history.
#
# BUGS
#    Email bugs to victor dot engmark at gmail dot com. Please include the
#    output of running this script in verbose mode (-v).
#
# COPYRIGHT AND LICENSE
#    Copyright (C) 2009 Victor Engmark
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see &#60;http://www.gnu.org/licenses/&#62;.
#
################################################################################

# Output error message with optional error code
error()
{
    if [ -z &#34;$2&#34; ]
    then
        error_code=$EX_UNKNOWN
    else
        error_code=$2
    fi
    echo &#34;$1&#34; &#62;&#38;2
    exit $error_code
}

usage()
{
    error &#34;Usage: ${cmdname} [-v&#124;--verbose] [--authors=path] &#60;Subversion URL&#62;&#34; $EX_USAGE
}

verbose_echo()
{
    if [ $verbose ]
    then
        echo &#34;$*&#34;
    fi
}

# Use for mandatory directory checks
# $1 is the directory path
# $2 is the (optional) error message
directory_exists()
{
    if [ ! -d $1 ]
    then
        error &#34;No such directory '${1}'
$2&#34; $EX_NO_SUCH_DIR
    fi
}

# Make sure an executable is available
# $1 is the path to the executable
# $2 is the (optional) error message
executable_exists()
{
    if [ ! -x $1 ]
    then
        error &#34;No such executable '${1}'
$2&#34; $EX_NO_SUCH_EXEC
    fi
}

PATH=&#34;/usr/bin:/bin&#34;
cmdname=`basename $0`
directory=$PWD

# Exit codes from /usr/include/sysexits.h, as recommended by
# http://www.faqs.org/docs/abs/HTML/exitcodes.html
EX_OK=0           # successful termination
EX_USAGE=64       # command line usage error
EX_DATAERR=65     # data format error
EX_NOINPUT=66     # cannot open input
EX_NOUSER=67      # addressee unknown
EX_NOHOST=68      # host name unknown
EX_UNAVAILABLE=69 # service unavailable
EX_SOFTWARE=70    # internal software error
EX_OSERR=71       # system error (e.g., can't fork)
EX_OSFILE=72      # critical OS file missing
EX_CANTCREAT=73   # can't create (user) output file
EX_IOERR=74       # input/output error
EX_TEMPFAIL=75    # temp failure; user is invited to retry
EX_PROTOCOL=76    # remote error in protocol
EX_NOPERM=77      # permission denied
EX_CONFIG=78      # configuration error

# Custom errors
EX_UNKNOWN=1
EX_NO_SUCH_DIR=91
EX_NO_SUCH_EXEC=92

# Process parameters
until [ $# -eq 0 ]
do
    case $1 in
        -v&#124;--verbose)
            verbose=1
            shift
            ;;
        --authors=*)
            authors_file=${directory}/$(echo &#34;$1&#34; &#124; cut -c11-)
            shift
            ;;
        *)
            if [ -z $svn_url ]
            then
                svn_url=$1
                shift
            else
                # Unknown parameter
                usage
            fi
            ;;
    esac
done

if [ -z $svn_url ]
then
    # No Subversion URL provided
    usage
fi

repository_name=`basename $svn_url`

verbose_echo &#34;Running $cmdname at `date`.&#34;

# Preliminary checks
directory_exists &#34;$source_base&#34;
executable_exists &#34;/usr/bin/git&#34;
executable_exists &#34;/usr/bin/git-svn&#34;
executable_exists &#34;/usr/bin/svn&#34;

verbose_echo &#34;Source repository: '${svn_url}'&#34;

if [ -z $authors_file ]
then
    # Get authors file
    authors_file=&#34;${directory}/${repository_name}-authors.txt&#34;
    if [ -e $authors_file ]
    then
        error &#34;Authors file '${authors_file}' already exists&#34;
    fi
    verbose_echo &#34;Authors file: ${authors_file}&#34;

    svn log --quiet &#34;${svn_url}&#34; &#124; grep '^r.*' &#124; cut -d ' ' -f 3- &#124; cut -d '&#124;' -f 1 &#124; sort &#124; uniq &#62; &#34;${authors_file}&#34;

    author=&#34;$(head -1 $authors_file)&#34;
    echo &#34;Please modify ${authors_file} to a format like&#34;
    echo &#34;${author}= Full Name &#60;${author}@example.org&#62;&#34;
    echo &#34;and rerun $cmdname with --authors=${authors_file}&#34;
else
    if [ ! -e $authors_file ]
    then
        error &#34;Authors file '${authors_file}' doesn't exist&#34;
    fi

    git_target=&#34;${directory}/${repository_name}.git&#34;
    if [ -e $git_target ]
    then
        error &#34;Target repository '${git_target}' already exists&#34;
    fi
    verbose_echo &#34;Target repository: '${git_target}'&#34;

    # Clone
    git-svn clone --no-metadata --authors-file=&#34;${authors_file}&#34; --revision 1:1 &#34;$svn_url&#34; &#34;$git_target&#34; &#124;&#124; error &#34;Clone failed&#34;

    # Fetch
    cd &#34;$git_target&#34;
    batch_start=2
    revisions=$(svn info &#34;$svn_url&#34; &#124; grep '^Revision:' &#124; awk '{print $2}')
    while [ $batch_start -le $revisions ]
    do
        batch_end=$(expr $batch_start + 990)
        if [ $batch_end -gt $revisions ]
        then
            batch_end=$revisions
        fi

        verbose_echo &#34;Fetching revisions $batch_start through $batch_end&#34;
        git-svn fetch --authors-file=&#34;${authors_file}&#34; --revision $batch_start:$batch_end &#124;&#124; error &#34;Fetch failed&#34;

        batch_start=$(expr $batch_end + 1)
    done

    git rebase git-svn

    verbose_echo &#34;Applying svn:ignore properties&#34;
    git-svn show-ignore &#62;&#62; .git/info/exclude

    verbose_echo &#34;Removing references to Subversion&#34;
    git config --remove-section svn-remote.svn
    rm --recursive --force .git/svn/
fi

verbose_echo &#34;Cleaning up.&#34;
cd &#34;$directory&#34;

verbose_echo &#34;${cmdname} completed at `date`.&#34;
exit $EX_OK</pre>
<p><strong>Now make sure you do a directory diff between the old Subversion and the new Git repositories to see if it succeeded.</strong></p>
<p>Now you can get this on other machines using<br />
<code>git clone --origin example ssh://example.org/~/settings</code></p>
<h2><a name="git-ignore">Generate and version .gitignore files</a></h2>
<p>This is an optional step in case you would like to version the old svn:ignore properties as .gitignore files:</p>
<h3><a name="exclude2gitignore">exclude2gitignore.sh</a></h3>
<pre class="brush: bash;">#!/bin/sh
#
# NAME
#    exclude2gitignore.sh - Convert $GIT_DIR/info/exclude to corresponding
#    .gitignore files
#
# SYNOPSIS
#    exclude2gitignore.sh [options] /path/to/repository
#
# OPTIONS
#    -v,--verbose    Verbose output
#
# EXAMPLE
#    /path/to/exclude2gitignore.sh ~/foo
#
#    Create .gitignore files for the Git repository in ~/foo
#
# DESCRIPTION
#    Based on the format generated by `git-svn show-ignore`, where non-comment
#    lines indicate ignored files. Will try to put the .gitignore as close as
#    possible to the ignored file(s).
#
# BUGS
#    Email bugs to victor dot engmark at gmail dot com. Please include the
#    output of running this script in verbose mode (-v).
#
# COPYRIGHT AND LICENSE
#    Copyright (C) 2009 Victor Engmark
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see &#60;http://www.gnu.org/licenses/&#62;.
#
################################################################################

# Output error message with optional error code
error()
{
    if [ -z &#34;$2&#34; ]
    then
        error_code=$EX_UNKNOWN
    else
        error_code=$2
    fi
    echo &#34;$1&#34; &#62;&#38;2
    exit $error_code
}

usage()
{
    error &#34;Usage: ${cmdname} [-v&#124;--verbose] /path/to/repository&#34; $EX_USAGE
}

verbose_echo()
{
    if [ $verbose ]
    then
        echo &#34;$*&#34;
    fi
}

# Use for mandatory directory checks
# $1 is the directory path
# $2 is the (optional) error message
directory_exists()
{
    if [ ! -d $1 ]
    then
        error &#34;No such directory '${1}'
$2&#34; $EX_NO_SUCH_DIR
    fi
}

# Make sure an executable is available
# $1 is the path to the executable
# $2 is the (optional) error message
executable_exists()
{
    if [ ! -x $1 ]
    then
        error &#34;No such executable '${1}'
$2&#34; $EX_NO_SUCH_EXEC
    fi
}

PATH=&#34;/usr/bin:/bin&#34;
cmdname=`basename $0`
directory=$PWD

# Exit codes from /usr/include/sysexits.h, as recommended by
# http://www.faqs.org/docs/abs/HTML/exitcodes.html
EX_OK=0           # successful termination
EX_USAGE=64       # command line usage error
EX_DATAERR=65     # data format error
EX_NOINPUT=66     # cannot open input
EX_NOUSER=67      # addressee unknown
EX_NOHOST=68      # host name unknown
EX_UNAVAILABLE=69 # service unavailable
EX_SOFTWARE=70    # internal software error
EX_OSERR=71       # system error (e.g., can't fork)
EX_OSFILE=72      # critical OS file missing
EX_CANTCREAT=73   # can't create (user) output file
EX_IOERR=74       # input/output error
EX_TEMPFAIL=75    # temp failure; user is invited to retry
EX_PROTOCOL=76    # remote error in protocol
EX_NOPERM=77      # permission denied
EX_CONFIG=78      # configuration error

# Custom errors
EX_UNKNOWN=1
EX_NO_SUCH_DIR=91
EX_NO_SUCH_EXEC=92

# Process parameters
until [ $# -eq 0 ]
do
    case $1 in
        -v&#124;--verbose)
            verbose=1
            shift
            ;;
        *)
            if [ -z $repository ]
            then
                repository=&#34;${1%\/}&#34;
                shift
            else
                # Unknown parameter
                usage
            fi
            ;;
   esac
done

verbose_echo &#34;Running $cmdname at `date`.&#34;

directory_exists &#34;$repository&#34;

grep '^/' &#34;${repository}/.git/info/exclude&#34; &#124; while read line
do
    ignore_path=&#34;${repository}${line}&#34;
    verbose_echo &#34;Starting with $ignore_path&#34;
    ignore_name=&#34;$ignore_path&#34;

    # Strip globs in path
    ignore_path=`dirname &#34;$ignore_path&#34;`
    while [ ! -e &#34;$ignore_path&#34; ]
    do
        ignore_path=`dirname &#34;$ignore_path&#34;`
    done

    # Remove path from file name (need +2 to include the end slash and to
    # compensate for 1-based indexing
    name_length=$(expr length &#34;$ignore_name&#34;)
    path_length=$(expr length &#34;$ignore_path&#34; + 2)
    ignore_name=$(expr substr &#34;$ignore_name&#34; $path_length $name_length)

    # Complete .gitignore path
    ignore_path=&#34;${ignore_path}/.gitignore&#34;

    verbose_echo &#34;$ignore_name &#62;&#62; $ignore_path&#34;
    echo &#34;$ignore_name&#34; &#62;&#62; &#34;$ignore_path&#34;
done

verbose_echo &#34;Cleaning up.&#34;
cd &#34;$directory&#34;

verbose_echo &#34;${cmdname} completed at `date`.&#34;
exit $EX_OK</pre>
<h2><a name="git-proxy">Git via proxy</a></h2>
<p>One of the machines involved is behind a <em>gateway machine</em> at work, so I had to add the following to <strong>~/.ssh/config</strong>:<br />
<code>
<pre>Host work
     ProxyCommand ssh -q gateway.example.org nc %h %p $*
     HostName work-pc.example.org</pre>
<p></code></p>
<p>With this, it&#8217;s possible to refer to just &#8220;work&#8221;, and SSH commands (even via Git) will take care of connecting via the proxy.</p>
<h2><a name="pull-remote">Setting up pull everywhere</a></h2>
<p>The main idea here is to set up Git &#8220;remotes&#8221; pointing to all the other machines.</p>
<p>To be able to get the updates from the repository in ~/settings on my.example.org, simply run the following on all machines (except, of course, the home machine):<br />
<code>git remote add home ssh://home-pc.example.net/~/settings</code></p>
<p>To be able to get the updates from the &#8220;work&#8221; host specified with a proxy above, just use &#8220;work&#8221; for the host name:<br />
<code>git remote add work ssh://work/~/settings</code></p>
<p>To be able to pull from a machine which changes IP address, you could set up a <a href="http://www.dyndns.com/">DynDNS</a> account and use one of their recommended <a href="http://www.dyndns.com/support/clients/unix.html">update scripts</a> to be able to refer to your machine using a single DNS name.</p>
<p>After cloning one of the copies on all of your hosts, you should be able to the following to get all the changes from the repositories:<br />
<code>git remote update &#38;&#38; git pull</code><br />
If this doesn&#8217;t work, you might have more luck fetching each repository individually, and then rebasing to it:<br />
<code>git fetch home &#38;&#38; git rebase home/master</code></p>
<p>To keep a backup on a separate machine, just do a<br />
<code>git clone --origin example ssh://example.org/~/settings</code><br />
there and set up pushing defaults on the other machines using<br />
<code>git config push.default matching<br />
git remote add backup ssh://backup.example.org/~/settings</code><br />
Then you can just <code>git push backup master</code> to backup the local master branch.</p>
<h2><a name="references">References</a></h2>
<ul>
<li><a href="http://pauldowman.com/2008/07/26/how-to-convert-from-subversion-to-git/">How to convert from Subversion to Git</a></li>
<li><a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html">git-svn manual page</a></li>
<li><a href="http://git.or.cz/course/svn.html">Git &#8211; SVN Crash Course</a></li>
<li><a href="http://git.or.cz/gitwiki/GitFaq#HowdoImirroraSVNrepositorytogit.3F">GitFaq</a></li>
<li>Excellent respondents at <a href="http://stackoverflow.com/">Stack Overflow</a> (<a href="http://stackoverflow.com/questions/1725780/git-pull-from-several-repos-in-one-command">1</a>, <a href="http://stackoverflow.com/questions/1734405/synchronizing-git-repos-across-machines-without-push">2</a>) and <a href="http://git.or.cz/gitwiki/GitCommunity">the Git community</a> (<a href="http://marc.info/?l=git&#38;m=125822750719729&#38;w=2">1</a>)</li>
<li><a href="http://maururu.net/2009/svn-to-git-take-2/">Moving from subversion to git permanently &#8211; take 2</a></li>
<li><a href="http://cheat.errtheblog.com/s/gitsvn/">$ cheat gitsvn</a></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Episode with Subversive AssertionFailedException]]></title>
<link>http://benjaminwss.wordpress.com/2009/11/14/episode-with-subversive-assertionfailedexception/</link>
<pubDate>Sat, 14 Nov 2009 13:06:06 +0000</pubDate>
<dc:creator>Benjamin Wong</dc:creator>
<guid>http://benjaminwss.wordpress.com/2009/11/14/episode-with-subversive-assertionfailedexception/</guid>
<description><![CDATA[I have been using Subversive as my main SVN plug-in for my instances of Eclipse both at home and at ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have been using Subversive as my main SVN plug-in for my instances of Eclipse both at home and at work since it is now part of the Eclipse foundation. It woks pretty much like SubEclipse which is the SVN plug-in I used since I started using Eclipse for my Flex and ColdFusion development. </p>
<p>I had a new unpack of Eclipse 3.4.2 Ganymede (Eclipse is not installed, just unpacked from a zip archive in case you did not know) and I needed to use SVN to check out some code. As usual I added the repository for the Subversive plug-in, clicked install and let it rip. It installed with no problem which it should and as with all plug-in installs for Eclipse, it requires an application restart. Everything is happening by the numbers thus far.</p>
<p>After Eclipse restarted, I proceeded to checkout an SVN project like you normally would, some of you who are attentive might have noticed something by now. Anyway I pasted the URL link into the repository URL and guess what? An Error got thrown. To those of you who saw this coming, kudos to you. </p>
<p>As all who had used Subversive before, the plug-in and SVN connectors are in two different repositories. From what I understand this is due to licensing issues but that is a story for another time. The point is that after you install the plug-in, you are supposed to install the connectors which I did not do.</p>
<p>So I thought no biggie, I will just have to install the connectors. Then my episode of getting AssetionFailedException errors kept on happening when I tried to install the connectors. So tried a different connector repository and still no dice. I was like what in the name god happened? Then I tried doing an update for all my plug-ins which is no small undertaking considering the fact that my friend here blew my home bandwidth cap and after an agonizing 11 minutes, same error came up.</p>
<p>At this point I felt that maybe I should just unpack a fresh Eclipse and start over but then I tought could this be a plug-in issue because Subversive ran without its dependent plug-in which perhaps caused some corruption? I closed Eclipse and fired my command prompt and did this :</p>
<blockquote><p>c:\&#62; cd eclipse</p>
<p>c:\eclipse&#62; eclipse –clean</p>
</blockquote>
<p>The clean argument passed onto Eclipse as you probably know is something used to basically start Eclipse and re-links all the plug-ins together and flushes everything save for your user preferences, at least thats what I think it does. I hoped this would flush out the corruption in my plug-ins wherever they might be. </p>
<p>After long waits and loads of resource consumption (note to self: running aTunes, Pidgin, Chrome and Windows Update is a bad idea when running eclipse -clean), I tried again to install my SVN connectors. Now it worked like its supposed to and then I decided to blog about this. Hope this helps somebody else who had the same issue as I did.</p>
<p>Useful Links :</p>
<p><a href="http://www.polarion.com/products/svn/subversive/download.php">http://www.polarion.com/products/svn/subversive/download.php</a></p>
<p><a href="http://www.eclipse.org/subversive/">http://www.eclipse.org/subversive/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Unfuddle: Hosting SVN Gratuito]]></title>
<link>http://nosoyfriky.wordpress.com/2009/11/12/unfuddle-hosting-svn-gratuito/</link>
<pubDate>Thu, 12 Nov 2009 17:52:49 +0000</pubDate>
<dc:creator>rantamplan87</dc:creator>
<guid>http://nosoyfriky.wordpress.com/2009/11/12/unfuddle-hosting-svn-gratuito/</guid>
<description><![CDATA[Buscando una alternativa a www.xp-dev.com, ya que he llegado al límite de los proyectos gratuitos (s]]></description>
<content:encoded><![CDATA[Buscando una alternativa a www.xp-dev.com, ya que he llegado al límite de los proyectos gratuitos (s]]></content:encoded>
</item>
<item>
<title><![CDATA[My SVN Global Ignore Pattern for C# and Resharper]]></title>
<link>http://blogs.edwardwilde.com/2009/11/11/my-svn-global-ignore-pattern-for-c-and-resharper/</link>
<pubDate>Wed, 11 Nov 2009 16:16:01 +0000</pubDate>
<dc:creator>Edward Wilde</dc:creator>
<guid>http://blogs.edwardwilde.com/2009/11/11/my-svn-global-ignore-pattern-for-c-and-resharper/</guid>
<description><![CDATA[*\bin* *\obj* *.suo *.user *.bak **.ReSharper** **\_ReSharper.** StyleCop.Cache]]></description>
<content:encoded><![CDATA[<div class='snap_preview'></p>
<p><code>*\bin* *\obj* *.suo *.user *.bak **.ReSharper** **\_ReSharper.** StyleCop.Cache</code></p>
<pre><code></code></pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[RabbitVCS, como tener TortoiseSVN en Linux]]></title>
<link>http://fdfblog.wordpress.com/2009/11/10/rabbitvcs-como-tener-tortoisesvn-en-linux/</link>
<pubDate>Tue, 10 Nov 2009 08:54:11 +0000</pubDate>
<dc:creator>Fernando de Francisco</dc:creator>
<guid>http://fdfblog.wordpress.com/2009/11/10/rabbitvcs-como-tener-tortoisesvn-en-linux/</guid>
<description><![CDATA[Es lo que tiene compartir información con la gente; ayer mismo andaba trabajando con un compañero en]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://fdfblog.wordpress.com/files/2009/11/rabbitvcs_context_menu.png?w=300"><img class="alignright size-medium wp-image-222" title="RabbitVCS Context Menu" src="http://fdfblog.wordpress.com/files/2009/11/rabbitvcs_context_menu.png?w=300" alt="RabbitVCS Context Menu" width="300" height="202" /></a>Es lo que tiene compartir información con la gente; ayer mismo andaba trabajando con un compañero en las pruebas finales de un proyecto en su portátil cuando nos dimos cuenta de que, posiblemente, hubiera versiones actualizadas en nuestro servidor SVN, por lo que se dispuso a actualizar. Me quedé sorprendido cuando abrió el Nautilus en su Ubuntu 9.04 y busco la carpeta de trabajo del SVN y con el menú contextual pinchó en &#8220;Actualizar&#8221;.</p>
<p>- ¿Y eso?, se parece al TortoiseSVN de Windows.</p>
<p>- Sí, es el RabbitVCS, y funciona bastante bien.</p>
<p>Así que ya sabéis, si os resulta harto cómodo el cliente SVN de Windows ahora podéis usar algo muy similar en vuestro Linux.</p>
<p><a href="http://www.rabbitvcs.org/">Más info</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Python script use to change SVN working copy format]]></title>
<link>http://gerardlee.wordpress.com/2009/11/10/python-script-use-to-change-svn-working-copy-format/</link>
<pubDate>Tue, 10 Nov 2009 01:34:19 +0000</pubDate>
<dc:creator>gerarldlee</dc:creator>
<guid>http://gerardlee.wordpress.com/2009/11/10/python-script-use-to-change-svn-working-copy-format/</guid>
<description><![CDATA[Python script use to change SVN working copy format from 1.4, 1.5, 1.6 to 1.4, 1.5, 1.6: Example usa]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Python script use to change SVN working copy format from 1.4, 1.5, 1.6 to 1.4, 1.5, 1.6:</p>
<p>Example usage:</p>
<p>python change-svn-wc-format.py &#60;working copy path&#62; 1.4 &#8211;verbose &#8211;force</p>
<p>This will convert the working copy path into 1.4.  This is useful if you are experiencing slow update or generally cannot update or use your subversion installation because its error says that the client is too old.  You might want to convert it to the version your client subversion is using.</p>
<pre>#!/usr/bin/env python
#
# change-svn-wc-format.py: Change the format of a Subversion working copy.
#
# ====================================================================
#    Licensed to the Subversion Corporation (SVN Corp.) under one
#    or more contributor license agreements.  See the NOTICE file
#    distributed with this work for additional information
#    regarding copyright ownership.  The SVN Corp. licenses this file
#    to you under the Apache License, Version 2.0 (the
#    "License"); you may not use this file except in compliance
#    with the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing,
#    software distributed under the License is distributed on an
#    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#    KIND, either express or implied.  See the License for the
#    specific language governing permissions and limitations
#    under the License.
# ====================================================================

import sys
import os
import getopt
try:
 my_getopt = getopt.gnu_getopt
except AttributeError:
 my_getopt = getopt.getopt

### The entries file parser in subversion/tests/cmdline/svntest/entry.py
### handles the XML-based WC entries file format used by Subversion
### 1.3 and lower.  It could be rolled into this script.

LATEST_FORMATS = { "1.4" : 8,
 "1.5" : 9,
 "1.6" : 10,
 # Do NOT add format 11 here.  See comment in must_retain_fields
 # for why.
 }

def usage_and_exit(error_msg=None):
 """Write usage information and exit.  If ERROR_MSG is provide, that
 error message is printed first (to stderr), the usage info goes to
 stderr, and the script exits with a non-zero status.  Otherwise,
 usage info goes to stdout and the script exits with a zero status."""
 progname = os.path.basename(sys.argv[0])

 stream = error_msg and sys.stderr or sys.stdout
 if error_msg:
 stream.write("ERROR: %s\n\n" % error_msg)
 stream.write("""\
usage: %s WC_PATH SVN_VERSION [--verbose] [--force] [--skip-unknown-format]
 %s --help

Change the format of a Subversion working copy to that of SVN_VERSION.

 --skip-unknown-format    : skip directories with unknown working copy
 format and continue the update

""" % (progname, progname))
 stream.flush()
 sys.exit(error_msg and 1 or 0)

def get_adm_dir():
 """Return the name of Subversion's administrative directory,
 adjusted for the SVN_ASP_DOT_NET_HACK environment variable.  See
 &#60;http://svn.collab.net/repos/svn/trunk/notes/asp-dot-net-hack.txt&#62;
 for details."""
 return "SVN_ASP_DOT_NET_HACK" in os.environ and "_svn" or ".svn"

class WCFormatConverter:
 "Performs WC format conversions."
 root_path = None
 error_on_unrecognized = True
 force = False
 verbosity = 0

 def write_dir_format(self, format_nbr, dirname, paths):
 """Attempt to write the WC format FORMAT_NBR to the entries file
 for DIRNAME.  Throws LossyConversionException when not in --force
 mode, and unconvertable WC data is encountered."""

 # Avoid iterating in unversioned directories.
 if not (get_adm_dir() in paths):
 del paths[:]
 return

 # Process the entries file for this versioned directory.
 if self.verbosity:
 print("Processing directory '%s'" % dirname)
 entries = Entries(os.path.join(dirname, get_adm_dir(), "entries"))
 entries_parsed = True
 if self.verbosity:
 print("Parsing file '%s'" % entries.path)
 try:
 entries.parse(self.verbosity)
 except UnrecognizedWCFormatException, e:
 if self.error_on_unrecognized:
 raise
 sys.stderr.write("%s, skipping\n" % e)
 sys.stderr.flush()
 entries_parsed = False

 if entries_parsed:
 format = Format(os.path.join(dirname, get_adm_dir(), "format"))
 if self.verbosity:
 print("Updating file '%s'" % format.path)
 format.write_format(format_nbr, self.verbosity)
 else:
 if self.verbosity:
 print("Skipping file '%s'" % format.path)

 if self.verbosity:
 print("Checking whether WC format can be converted")
 try:
 entries.assert_valid_format(format_nbr, self.verbosity)
 except LossyConversionException, e:
 # In --force mode, ignore complaints about lossy conversion.
 if self.force:
 print("WARNING: WC format conversion will be lossy. Dropping "\
 "field(s) %s " % ", ".join(e.lossy_fields))
 else:
 raise

 if self.verbosity:
 print("Writing WC format")
 entries.write_format(format_nbr)

 def change_wc_format(self, format_nbr):
 """Walk all paths in a WC tree, and change their format to
 FORMAT_NBR.  Throw LossyConversionException or NotImplementedError
 if the WC format should not be converted, or is unrecognized."""
 for dirpath, dirs, files in os.walk(self.root_path):
 self.write_dir_format(format_nbr, dirpath, dirs + files)

class Entries:
 """Represents a .svn/entries file.

 'The entries file' section in subversion/libsvn_wc/README is a
 useful reference."""

 # The name and index of each field composing an entry's record.
 entry_fields = (
 "name",
 "kind",
 "revision",
 "url",
 "repos",
 "schedule",
 "text-time",
 "checksum",
 "committed-date",
 "committed-rev",
 "last-author",
 "has-props",
 "has-prop-mods",
 "cachable-props",
 "present-props",
 "conflict-old",
 "conflict-new",
 "conflict-wrk",
 "prop-reject-file",
 "copied",
 "copyfrom-url",
 "copyfrom-rev",
 "deleted",
 "absent",
 "incomplete",
 "uuid",
 "lock-token",
 "lock-owner",
 "lock-comment",
 "lock-creation-date",
 "changelist",
 "keep-local",
 "working-size",
 "depth",
 "tree-conflicts",
 "file-external",
 )

 # The format number.
 format_nbr = -1

 # How many bytes the format number takes in the file.  (The format number
 # may have leading zeroes after using this script to convert format 10 to
 # format 9 -- which would write the format number as '09'.)
 format_nbr_bytes = -1

 def __init__(self, path):
 self.path = path
 self.entries = []

 def parse(self, verbosity=0):
 """Parse the entries file.  Throw NotImplementedError if the WC
 format is unrecognized."""

 input = open(self.path, "r")

 # Read WC format number from INPUT.  Validate that it
 # is a supported format for conversion.
 format_line = input.readline()
 try:
 self.format_nbr = int(format_line)
 self.format_nbr_bytes = len(format_line.rstrip()) # remove '\n'
 except ValueError:
 self.format_nbr = -1
 self.format_nbr_bytes = -1
 if not self.format_nbr in LATEST_FORMATS.values():
 raise UnrecognizedWCFormatException(self.format_nbr, self.path)

 # Parse file into individual entries, to later inspect for
 # non-convertable data.
 entry = None
 while True:
 entry = self.parse_entry(input, verbosity)
 if entry is None:
 break
 self.entries.append(entry)

 input.close()

 def assert_valid_format(self, format_nbr, verbosity=0):
 if verbosity &#62;= 2:
 print("Validating format for entries file '%s'" % self.path)
 for entry in self.entries:
 if verbosity &#62;= 3:
 print("Validating format for entry '%s'" % entry.get_name())
 try:
 entry.assert_valid_format(format_nbr)
 except LossyConversionException:
 if verbosity &#62;= 3:
 sys.stderr.write("Offending entry:\n%s\n" % entry)
 sys.stderr.flush()
 raise

 def parse_entry(self, input, verbosity=0):
 "Read an individual entry from INPUT stream."
 entry = None

 while True:
 line = input.readline()
 if line in ("", "\x0c\n"):
 # EOF or end of entry terminator encountered.
 break

 if entry is None:
 entry = Entry()

 # Retain the field value, ditching its field terminator ("\x0a").
 entry.fields.append(line[:-1])

 if entry is not None and verbosity &#62;= 3:
 sys.stdout.write(str(entry))
 print("-" * 76)
 return entry

 def write_format(self, format_nbr):
 # Overwrite all bytes of the format number (which are the first bytes in
 # the file).  Overwrite format '10' by format '09', which will be converted
 # to '9' by Subversion when it rewrites the file.  (Subversion 1.4 and later
 # ignore leading zeroes in the format number.)
 assert len(str(format_nbr)) &#60;= self.format_nbr_bytes
 format_string = '%0' + str(self.format_nbr_bytes) + 'd'

 os.chmod(self.path, 0600)
 output = open(self.path, "r+", 0)
 output.write(format_string % format_nbr)
 output.close()
 os.chmod(self.path, 0400)

class Entry:
 "Describes an entry in a WC."

 # Maps format numbers to indices of fields within an entry's record that must
 # be retained when downgrading to that format.
 must_retain_fields = {
 # Not in 1.4: changelist, keep-local, depth, tree-conflicts, file-externals
 8  : (30, 31, 33, 34, 35),
 # Not in 1.5: tree-conflicts, file-externals
 9  : (34, 35),
 10 : (),
 # Downgrading from format 11 (1.7-dev) to format 10 is not possible,
 # because 11 does not use has-props and cachable-props (but 10 does).
 # Naively downgrading in that situation causes properties to disappear
 # from the wc.
 #
 # Downgrading from the 1.7 SQLite-based format to format 10 is not
 # implemented.
 }

 def __init__(self):
 self.fields = []

 def assert_valid_format(self, format_nbr):
 "Assure that conversion will be non-lossy by examining fields."

 # Check whether lossy conversion is being attempted.
 lossy_fields = []
 for field_index in self.must_retain_fields[format_nbr]:
 if len(self.fields) - 1 &#62;= field_index and self.fields[field_index]:
 lossy_fields.append(Entries.entry_fields[field_index])
 if lossy_fields:
 raise LossyConversionException(lossy_fields,
 "Lossy WC format conversion requested for entry '%s'\n"
 "Data for the following field(s) is unsupported by older versions "
 "of\nSubversion, and is likely to be subsequently discarded, and/or "
 "have\nunexpected side-effects: %s\n\n"
 "WC format conversion was cancelled, use the --force option to "
 "override\nthe default behavior."
 % (self.get_name(), ", ".join(lossy_fields)))

 def get_name(self):
 "Return the name of this entry."
 return len(self.fields) &#62; 0 and self.fields[0] or ""

 def __str__(self):
 "Return all fields from this entry as a multi-line string."
 rep = ""
 for i in range(0, len(self.fields)):
 rep += "[%s] %s\n" % (Entries.entry_fields[i], self.fields[i])
 return rep

class Format:
 """Represents a .svn/format file."""

 def __init__(self, path):
 self.path = path

 def write_format(self, format_nbr, verbosity=0):
 format_string = '%d\n'
 if os.path.exists(self.path):
 if verbosity &#62;= 1:
 print("%s will be updated." % self.path)
 os.chmod(self.path,0600)
 else:
 if verbosity &#62;= 1:
 print("%s does not exist, creating it." % self.path)
 format = open(self.path, "w")
 format.write(format_string % format_nbr)
 format.close()
 os.chmod(self.path, 0400)

class LocalException(Exception):
 """Root of local exception class hierarchy."""
 pass

class LossyConversionException(LocalException):
 "Exception thrown when a lossy WC format conversion is requested."
 def __init__(self, lossy_fields, str):
 self.lossy_fields = lossy_fields
 self.str = str
 def __str__(self):
 return self.str

class UnrecognizedWCFormatException(LocalException):
 def __init__(self, format, path):
 self.format = format
 self.path = path
 def __str__(self):
 return ("Unrecognized WC format %d in '%s'; "
 "only formats 8, 9, and 10 can be supported") % (self.format, self.path)

def main():
 try:
 opts, args = my_getopt(sys.argv[1:], "vh?",
 ["debug", "force", "skip-unknown-format",
 "verbose", "help"])
 except:
 usage_and_exit("Unable to process arguments/options")

 converter = WCFormatConverter()

 # Process arguments.
 if len(args) == 2:
 converter.root_path = args[0]
 svn_version = args[1]
 else:
 usage_and_exit()

 # Process options.
 debug = False
 for opt, value in opts:
 if opt in ("--help", "-h", "-?"):
 usage_and_exit()
 elif opt == "--force":
 converter.force = True
 elif opt == "--skip-unknown-format":
 converter.error_on_unrecognized = False
 elif opt in ("--verbose", "-v"):
 converter.verbosity += 1
 elif opt == "--debug":
 debug = True
 else:
 usage_and_exit("Unknown option '%s'" % opt)

 try:
 new_format_nbr = LATEST_FORMATS[svn_version]
 except KeyError:
 usage_and_exit("Unsupported version number '%s'; "
 "only 1.4, 1.5, and 1.6 can be supported" % svn_version)

 try:
 converter.change_wc_format(new_format_nbr)
 except LocalException, e:
 if debug:
 raise
 sys.stderr.write("%s\n" % e)
 sys.stderr.flush()
 sys.exit(1)

 print("Converted WC at '%s' into format %d for Subversion %s" % \
 (converter.root_path, new_format_nbr, svn_version))

if __name__ == "__main__":
 main()
</pre>
</div>]]></content:encoded>
</item>

</channel>
</rss>
