<?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>SVN &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/svn/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Fri, 06 Apr 2018 18:49:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Using Subversion Externals with Xojo Text Projects</title>
		<link>https://blog.xojo.com/2018/04/06/using-subversion-externalswith-xojo-text-projects/</link>
		
		<dc:creator><![CDATA[Greg O'Lone]]></dc:creator>
		<pubDate>Fri, 06 Apr 2018 10:00:59 +0000</pubDate>
				<category><![CDATA[Source Control]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[VCP]]></category>
		<category><![CDATA[Version Control]]></category>
		<guid isPermaLink="false">http://blog.xojo.com/?p=2160</guid>

					<description><![CDATA[How to share code among several projects with more than one developer? There can be issues with exporting classes and modules to a shared folder and have everyone include those in their projects use them, especially when using shared services like DropBox. The folks at who are maintaining Subversion at the Apache Software Foundation made it super easy to create shared code repositories using a feature called Externals.]]></description>
										<content:encoded><![CDATA[<p>A topic that comes up every once in a while on the forums is how to share code among several projects with more than one developer. Quite often what users try to do is to export classes and modules to a shared folder and have everyone include those in their projects. There can be issues with this technique, especially when using shared services like DropBox.</p>
<p>Because of the latency involved, external items shared in a shared folder on a server or a file sharing service are never truly in-sync with one another. While this technique works with a single developer across two or three projects, it gets more and more complicated as you add more projects and even more-so if you try to add more developers.</p>
<p>One of the largest issues with this type of system is that everything <em>must</em> be kept in sync all the time. Making one little change to a shared file or method which works fine in the current project could completely break a project that you haven&#8217;t worked on in a year. When you do get around to working on it again, there&#8217;s three possibilities:</p>
<ol>
<li>The project compiles and everything works just like it did before.</li>
<li>The project doesn&#8217;t compile.</li>
<li>The project compiles and doesn&#8217;t work like it did before.</li>
</ol>
<p>With careful planning, you&#8217;ll probably hit #1 75% of the time, but the other two are wrought with problems. If the project compiles but doesn&#8217;t work correctly, <em>you may not find out until you&#8217;ve given it to your users,</em> with the worst case being unrecoverable data corruption. If it doesn&#8217;t compile, then what? The shared code is now required to be different in two different projects and you may have no history as to what was changed.</p>
<p>Thankfully the folks at who are maintaining <a href="https://subversion.apache.org">Subversion at the Apache Software Foundation</a> made it super easy to create shared code repositories using a feature called Externals. (For those of you that are using Git, I suggest looking into Submodules. Of the two techniques I&#8217;ve encountered, Submodules seem to require the least individual overhead.)</p>
<p><span id="more-2160"></span></p>
<h3>SVN Externals</h3>
<p>SVN Externals are exposed as a property (svn:externals) on the containing folder and is set up using the <strong>svn propset</strong> or <strong>svn propedit</strong> commands, but most SVN visual clients have an interface for creating an SVN External to make the process easier. Once it&#8217;s set on a versioned directory, everyone who checks out or updates the working copy also gets the external definition.</p>
<p>It&#8217;s worth keeping in mind that because an SVN External definition points to a specific place within another repository, that this other location is also versioned. That is, you can (and probably should) point an external definition at a <em>particular revision</em> within that repository unless there&#8217;s a very good reason to always be pointing at the latest/greatest version. This helps alleviate the problems with shared library changes. Once you have it working for a particular version, you can lock-in to a particular date/time until you&#8217;re ready to check with a newer version.</p>
<h3>Externals in Xojo</h3>
<p>Setting up externals for use with a Xojo Text Project is fairly simple to do. As an example, let&#8217;s say you have two projects &#8230; ProjectX and ProjectY. ProjectX contains some items that you&#8217;d like to share with ProjectY.</p>
<ol>
<li>Within Xojo, Open ProjectX and make a folder named &#8220;Shared_Items&#8221; and move any items you wish to share into this folder.</li>
<li>Save ProjectX and close it.</li>
<li>Quit the IDE.</li>
<li>Depending on whether you&#8217;re using a visual SVN client or the SVN command line the steps are similar:
<ol>
<li>Go to the directory above where the &#8220;Shared_Items&#8221; folder is located in ProjectY</li>
<li>Remove the empty &#8220;Shared_Items&#8221; folder.</li>
<li>Add an SVN external with the name &#8220;Shared_Items&#8221; which points to the Shared_Items in the other repository (or branch or wherever it is).
<ol>
<li>If you&#8217;re doing this using the command line, the command is:<br />
<code>svn propset svn:externals "Shared_Items https://path/to/other/Shared_Items" .</code><br />
If you want to lock the project to a particular revision, you&#8217;ll need to tell SVN which revision to use:<br />
<code>svn propset svn:externals "Shared_Items -r12345 https://path/to/other/Shared_Items" .</code><br />
Each of these commands are basically saying: Create a new external named &#8220;Shared_Items&#8221; using the https://path/to/other/Shared_Items source in the local directory (.), with the second one specifying that you want to use revision 12345.</li>
<li>If you&#8217;re using a GUI client you usually select the parent folder and then add an external definition from there. There are usually fields for specifying the Local Path (Shared_Items), URL (https://path/to/other/Shared_Items) and Revision (either HEAD or a specific revision number)</li>
</ol>
</li>
<li>Now you need to update the contents of the folder.<br />
<code>svn update Shared_Items</code></li>
</ol>
</li>
<li>Open ProjectY.</li>
<li>Drag the &#8220;Shared_Items&#8221; folder from the project folder directly into your project. DO NOT SAVE YET. Any modules which contained other items will be represented by a Module in the project and an identically named Folder which contains the items that should be put inside the module.</li>
<li>Referring back to Project X, drag each of the items in Shared_Items to its corresponding location in ProjectY. It&#8217;s very important that the on-disk representation in both projects be identical, so make sure you&#8217;re using the same version of Xojo in both projects. For example, if after dragging in the Shared_Items folder, you might have:
<pre>Shared_Items
  Module1 (Module)
  Module1 (Folder)
    Class1
    Module2 (Module)
    Module2 (Folder)
      Class2</pre>
</li>
<li>If you have multiple levels of nested modules, I suggest working from the bottom up, that is from the lowest directories up to the highest ones to avoid confusion. Once you&#8217;ve emptied a folder, delete it. Using the example above:
<ol>
<li>Drag Class2 from the Module2 <em>folder</em> directly into the Module2 <em>module.</em></li>
<li>Delete the Module2 <em>folder</em>.</li>
<li>Drag Class1 from the Module1 <em>folder</em> directly into the Module1 <em>module</em>.</li>
<li>Drag Module2 <em>module</em> into the Module1 <em>module</em>.</li>
<li>Delete the Module1 <em>folder</em>.</li>
</ol>
</li>
<li>Once the structure looks the same between the two projects, Save ProjectY. You&#8217;ll notice that <em>on disk</em> the folders are still there. That&#8217;s exactly what you should see. Check your SVN client, there should be no changes to be checked in. If there are, make sure they&#8217;re not file additions and/or deletions.</li>
</ol>
<p>From now on (if you&#8217;re using a non-revision specific external), whenever you make a change to one of the items in this Shared_Items folder and check them in, they&#8217;ll be available to any other projects that use them, whether it&#8217;s the original items or any project where this folder is defined as an external.</p>
<p>While this looks really complicated to set up, once it&#8217;s done using the external will work and feel just like any other folder in your project.</p>
<p>A few things to remember:</p>
<ol>
<li>Make sure you&#8217;ve named the shared items container so that it&#8217;s obvious that the items are shared between projects, so things don&#8217;t get inadvertently dragged into the folder if they&#8217;re not needed anywhere else and not dragged out of the folder if they are.</li>
<li>Make sure everyone on your team understands that this code is shared among projects.</li>
<li>Write Unit Tests for your shared items so when making changes you can verify that you&#8217;re not breaking other projects or inadvertently changing their behavior.</li>
</ol>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Working and Saving with Subversion</title>
		<link>https://blog.xojo.com/2017/03/16/working-and-saving-with-subversion/</link>
		
		<dc:creator><![CDATA[Norman Palardy]]></dc:creator>
		<pubDate>Thu, 16 Mar 2017 07:00:36 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[SVN]]></category>
		<guid isPermaLink="false">http://blog.xojo.com/?p=2450</guid>

					<description><![CDATA[It's a simple, quick way to work with your Xojo code with SVN.]]></description>
										<content:encoded><![CDATA[<p><a href="https://en.wikipedia.org/wiki/Apache_Subversion">Apache Subversion</a> (SVN) is a popular, open source versioning and revision control system. We use it here at Xojo.</p>
<p>You will have times when SVN will update the files on your drive, such as when you update from the server. Xojo does not automatically detect these changes, so most people resort to closing the project file and re-opening it in order to get the new changes displayed in Xojo. In fact, Xojo includes an IDE script to do just that: Examples/Advanced/IDE Scripting/ReloadProject.</p>
<p>There&#8217;s another solution. Here&#8217;s my tip for what I do to quickly have the IDE load those changes without having to close and re-open the project:</p>
<ul>
<li>Save my changes in Xojo</li>
<li>Merge incoming changes from SVN to my local working copy</li>
<li>Touch ONE item in the IDE. For example, change one letter in a property and then change it back.</li>
<li>Select File-&gt;Revert to Saved</li>
</ul>
<p>Voila! The newly merged code on the disk is loaded into the Xojo IDE. It&#8217;s a simple, quick way to work with your Xojo code and SVN.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
