<?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>Florent Clairambault &#187; SVN</title>
	<atom:link href="http://florent.clairambault.fr/tag/svn/feed" rel="self" type="application/rss+xml" />
	<link>http://florent.clairambault.fr</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 20:31:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>WP Codebox Quick fix for WordPress 2.9</title>
		<link>http://florent.clairambault.fr/wp-codebox-quick-fix-for-wordpress-2-9?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wp-codebox-quick-fix-for-wordpress-2-9</link>
		<comments>http://florent.clairambault.fr/wp-codebox-quick-fix-for-wordpress-2-9#comments</comments>
		<pubDate>Mon, 07 Dec 2009 19:00:02 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WP Codebox]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=2120</guid>
		<description><![CDATA[This bug has been fixed ! I like to have the latest version of WordPress, this is why I use the SVN version. And recently the CSS of the &#8220;WP Codebox&#8221; plugin stopped working. Here the explanation and the solution : It seems that starting with the 2.9 version, you can register the styles in [...]]]></description>
			<content:encoded><![CDATA[<p><strong style="color: red">This bug has been fixed !</strong></p>
<p>I like to have the latest version of WordPress, this is why I use <a href="http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion">the SVN version</a>. And recently the CSS of the &#8220;WP Codebox&#8221; plugin stopped working. Here the explanation and the solution :</p>
<p>It seems that starting with the 2.9 version, you can register the styles in the &#8220;wp_print_scripts&#8221; action method. So in the wp-codebox.php file, you have to put this :</p>

<div class="wp_codebox"><table><tr id="p21202"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code" id="p2120code2"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_print_scripts'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Codebox_ScriptsAction'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> Codebox_ScriptsAction <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$cb_path</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wpurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/wp-content/plugins/wp-codebox&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//URL to the plugin directory</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'codebox'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cb_path</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/js/codebox.js'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'0.1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_print_styles'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Codebox_StylesAction'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> Codebox_StylesAction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$cb_path</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wpurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/wp-content/plugins/wp-codebox&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//URL to the plugin directory</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                wp_enqueue_style<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'codebox'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cb_path</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/css/codebox.css'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'0.1'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'screen'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>And it will work&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/wp-codebox-quick-fix-for-wordpress-2-9/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN : Go further</title>
		<link>http://florent.clairambault.fr/svn-go-further?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=svn-go-further</link>
		<comments>http://florent.clairambault.fr/svn-go-further#comments</comments>
		<pubDate>Sat, 21 Nov 2009 08:00:15 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Dropbox]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=1951</guid>
		<description><![CDATA[I&#8217;m not a huge fan of SVN. It&#8217;s crappy for file transfers and it easily locks. But still, it works pretty well for my relatively small needs and it&#8217;s super easy to setup. I&#8217;d like to talk a little bit about the things you might not know about SVN&#8230; Hooks on the SVN Server You [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not a huge fan of SVN. It&#8217;s crappy for file transfers and it easily locks. But still, it works pretty well for my relatively small needs and it&#8217;s super easy to setup. I&#8217;d like to talk a little bit about the things you might not know about SVN&#8230;</p>
<p><strong>Hooks on the SVN Server</strong><br />
You might not know this but you can add a lot of personalized actions on your repository. You just have to add script files to the &#8220;hooks&#8221; directory of your repository. For a complete list of hooks file name, <a href="http://svnbook.red-bean.com/en/1.2/svn.reposadmin.create.html">look here</a>.<br />
The two most important files you should consider adding are : </p>
<ul>
<li>post-commit : This file is executed each time something is commited. With it you can send the change made during the last commit.</li>
<li>pre-revprop-change : This file controls what property you allow to change on your published files. It&#8217;s really useful when you want to allow people to edit some already committed logs.</li>
</ul>
<p><strong>Useful SVN properties on files and directories</strong><br />
SVN properties can be attached to files and directory to define special behaviors on the other clients or on the server. For a complete list of the SVN properties, <a href="http://svnbook.red-bean.com/en/1.5/svn.ref.properties.html">look here</a>. Here are for me the most important SVN properties : </p>
<ul>
<li>svn:externals : Reference to an external SVN source. This is very useful, you can have the same files copied.</li>
<li>svn:needs-lock : This will force you to lock file(s) before committing them. This should be only use for special files like binary file that can&#8217;t be merged (Word can merge concurrent versions of the same file).</li>
</ul>
<p>Quick note : A very bad idea I had was to put my SVN files within my dropbox folder. It creates a lot more locks than SVN normally does.</p>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/svn-go-further/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Insert SVN version and Build number in your C# AssemblyInfo file</title>
		<link>http://florent.clairambault.fr/insert-svn-version-and-build-number-in-your-c-assemblyinfo-file?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=insert-svn-version-and-build-number-in-your-c-assemblyinfo-file</link>
		<comments>http://florent.clairambault.fr/insert-svn-version-and-build-number-in-your-c-assemblyinfo-file#comments</comments>
		<pubDate>Tue, 03 Feb 2009 18:51:35 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=115</guid>
		<description><![CDATA[Software version number is quite important. It helps you track what versions have your users when they report something. And when it’s linked to an SVN version number, it’s even better. Well, with MSBuild Community Task, you can easily automatically generate smart version numbers, you have to: Download MSBuildCommunityTasks Make sure your “svn.exe” binary is [...]]]></description>
			<content:encoded><![CDATA[<p>Software version number is quite important. It helps you track what versions have your users when they report something. And when it’s linked to an SVN version number, it’s even better.</p>
<p>Well, with MSBuild Community Task, you can easily automatically generate smart version numbers, you have to:</p>
<ul>
<li>Download MSBuildCommunityTasks</li>
<li>Make sure your “svn.exe” binary is in C:\program files\subversion\bin</li>
<li>Add this at the end of your .csproject file :</li>
</ul>

<div class="wp_codebox"><table><tr id="p1155"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code" id="p115code5"><pre class="xml" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- Import of the MSBuildCommunityTask targets --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Import</span> <span style="color: #000066;">Project</span>=<span style="color: #ff0000;">&quot;$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- to manage version number --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Target</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Version&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Version</span> <span style="color: #000066;">VersionFile</span>=<span style="color: #ff0000;">&quot;version.txt&quot;</span> <span style="color: #000066;">RevisionType</span>=<span style="color: #ff0000;">&quot;Increment&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Output</span> <span style="color: #000066;">TaskParameter</span>=<span style="color: #ff0000;">&quot;Major&quot;</span> <span style="color: #000066;">PropertyName</span>=<span style="color: #ff0000;">&quot;Major&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Output</span> <span style="color: #000066;">TaskParameter</span>=<span style="color: #ff0000;">&quot;Minor&quot;</span> <span style="color: #000066;">PropertyName</span>=<span style="color: #ff0000;">&quot;Minor&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Output</span> <span style="color: #000066;">TaskParameter</span>=<span style="color: #ff0000;">&quot;Build&quot;</span> <span style="color: #000066;">PropertyName</span>=<span style="color: #ff0000;">&quot;Build&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Output</span> <span style="color: #000066;">TaskParameter</span>=<span style="color: #ff0000;">&quot;Revision&quot;</span> <span style="color: #000066;">PropertyName</span>=<span style="color: #ff0000;">&quot;Revision&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
  <span style="color: #808080; font-style: italic;">&lt;!-- to generate our personnal version info --&gt;</span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Target</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;AssemblyInfo&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;SvnVersion</span> <span style="color: #000066;">LocalPath</span>=<span style="color: #ff0000;">&quot;$(MSBuildProjectDirectory)&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Output</span> <span style="color: #000066;">TaskParameter</span>=<span style="color: #ff0000;">&quot;Revision&quot;</span> <span style="color: #000066;">PropertyName</span>=<span style="color: #ff0000;">&quot;Build&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/SvnVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;AssemblyInfo</span></span>
<span style="color: #009900;">    <span style="color: #000066;">CodeLanguage</span>=<span style="color: #ff0000;">&quot;CS&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">OutputFile</span>=<span style="color: #ff0000;">&quot;Properties\AssemblyInfo.cs&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">AssemblyTitle</span>=<span style="color: #ff0000;">&quot;Title&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">AssemblyDescription</span>=<span style="color: #ff0000;">&quot;Description&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">AssemblyCompany</span>=<span style="color: #ff0000;">&quot;Company&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">AssemblyProduct</span>=<span style="color: #ff0000;">&quot;product&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">AssemblyCopyright</span>=<span style="color: #ff0000;">&quot;Copyright © 2009&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">ComVisible</span>=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">Guid</span>=<span style="color: #ff0000;">&quot;88812638-9547-4480-9bf4-4fe25103b35c&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">AssemblyVersion</span>=<span style="color: #ff0000;">&quot;$(Major).$(Minor).$(Build).$(Revision)&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">AssemblyFileVersion</span>=<span style="color: #ff0000;">&quot;$(Major).$(Minor).$(Build).$(Revision)&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">Condition</span>=<span style="color: #ff0000;">&quot;$(Revision) != '0' &quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- We launch these two targets --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Target</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;BeforeBuild&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;CallTarget</span> <span style="color: #000066;">Targets</span>=<span style="color: #ff0000;">&quot;Version&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;CallTarget</span> <span style="color: #000066;">Targets</span>=<span style="color: #ff0000;">&quot;AssemblyInfo&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Target</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;AfterBuild&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>You should only have a &#8220;&lt;/Project&gt;&#8221; field left…</p>
<p>Then, you just have to open your project and build your project, it will fail once (missing version.txt file) and then work forever. This will generate your Assembly &#038; AssemblyFile versions like this: Major.Minor.SvnVersion.BuildVersion </p>
<p>In your C# code, to get your version, you just have to add something like that:</p>

<div class="wp_codebox"><table><tr id="p1156"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p115code6"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">String</span> Version <span style="color: #008000;">&#123;</span>
  get <span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Reflection</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">Assembly</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetExecutingAssembly</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetName</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Version</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
  <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/insert-svn-version-and-build-number-in-your-c-assemblyinfo-file/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.259 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-07-29 16:48:38 -->
