<?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>Subversion &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Wed, 06 Jul 2022 20:20:28 +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>Source Control Solutions</title>
		<link>https://blog.xojo.com/2015/07/28/source-control-solutions/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 28 Jul 2015 00:00:00 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[Subversion]]></category>
		<guid isPermaLink="false">http://blogtemp.xojo.com/2015/07/28/source-control-solutions/</guid>

					<description><![CDATA[Source control and version control solutions that you can use with Xojo.]]></description>
										<content:encoded><![CDATA[<p>Anyone who is developing software, even if they are the only person working on the project, should be using source control (aka as version control). As you can see, this comes up a lot:</p>
<p><span id="more-321"></span></p>
<ul>
<li><a href="https://youtu.be/A4YsbOUqPz8">Source control webinar</a></li>
<li><a href="https://youtu.be/D_iMQAjaxLA">Getting to Know Git, part 1 webinar</a></li>
<li><a href="https://youtu.be/ReztN3lJf5A">Getting to Know Git, part 2 webinar</a></li>
<li><a href="http://www.xojo.com/store/#conference">Saving your Sanity with Git for Source Code Management XDC 2015 session</a></li>
<li><a href="http://flightgeekjustin.wordpress.com/2013/04/30/using-git-tips-with-real-studio-xojo/">Using Git with Xojo</a></li>
<li><a href="http://www.xdevmag.com/browse/12.4/12408/">Mercurial and Xojo</a></li>
</ul>
<p>Source control tracks your changes, can serve as a backup and allows you to try new and different things without fear of completely breaking your code (because you can always go back to a prior, working version of the source).</p>
<p>Since we talk about why you should be using source control so much, I thought I would point out some companies that provide hosted source control and some tools to help you use source control with Xojo.</p>
<p>Now remember, you can use Xojo with <strong>any</strong> source control system, but you&#8217;ll want to use the Text Project format which is available in licensed versions of Xojo (Desktop and higher). The Text Project format is not available with Single Desktop or the Free version of Xojo.</p>
<h2>Subversion</h2>
<p><a href="https://subversion.apache.org/">Subversion</a> is an open-source version control system made by the Apache folks. It is widely used and relatively easy to understand, using a centralized server as the master repository (or repo) for your source code.</p>
<ul>
<li><a href="https://bitbucket.org/product/version-control-software">BitBucket</a></li>
<li><a href="http://beanstalkapp.com/pricing">Beanstalk</a> (free plan available)</li>
<li><a href="https://www.assembla.com/subversion/">Assembla</a> (free plan available)</li>
</ul>
<p>You&#8217;re likely to want to use a Subversion client app to make working with Subversion as easy as possible. Here are some that are available:</p>
<ul>
<li><a href="https://ikoder.com">Xversion</a> (Mac)</li>
<li><a href="http://versionsapp.com/">Versions</a> (Mac)</li>
<li><a href="https://www.zennaware.com/cornerstone/index.php">Cornerstone</a> (Mac)</li>
<li><a href="http://www.smartsvn.com/">SmartSVN</a> (Mac, Windows, Linux)</li>
<li><a href="http://tortoisesvn.net/">TortoiseSVN</a> (Windows)</li>
</ul>
<h2>Git</h2>
<p><a href="https://git-scm.com/">Git</a> is a &#8220;free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency&#8221;. With a distributed system, the full repo is available at each user. You can commit locally before pushing changes up to a central server for others to see.</p>
<ul>
<li><a href="https://github.com/">GitHub</a> (free plans available)</li>
<li><a href="https://about.gitlab.com">GitLab</a> (free plans available)</li>
<li><a href="https://bitbucket.org/">BitBucket</a> (free plan available)</li>
</ul>
<p>And here are some Git clients:</p>
<ul>
<li><a href="https://www.sourcetreeapp.com/">SourceTree</a> (Windows, OS X)</li>
<li>GitHub (<a href="https://windows.github.com/">Windows</a>, <a href="https://mac.github.com/">OS X</a>)</li>
<li><a href="http://www.git-tower.com/">Tower</a> (OS X)</li>
<li><a href="https://code.google.com/p/tortoisegit/">TortoiseGit</a> (Windows)</li>
<li><a href="http://www.syntevo.com/smartgit/">SmartGit</a> (Windows, OS X, Linux)</li>
</ul>
<p>Learn how to <a href="https://blog.xojo.com/2018/01/17/start-an-open-source-project-on-github/">Start and Open-Source Xojo Project on GitHub</a>.</p>
<h2>Mercurial</h2>
<p><a href="https://mercurial.selenic.com/">Mercurial</a> is a &#8220;free, distributed source control management tool. It efficiently handles projects of any size and offers an easy and intuitive interface&#8221;.</p>
<ul>
<li><a href="https://bitbucket.org/">BitBucket</a> (free plan available)</li>
</ul>
<h2>Which Should You Use?</h2>
<p>There is no right answer to this question. I have used Subversion and Git (and others), but not Mercurial. In my opinion, Subversion is easier to learn than Git, but it is less flexible. These days my preference is to use Git.</p>
<p>Of course, there are lots of other source control systems that exist, but the above are the major ones. If you are already using another source control system with other tools, rest assured that it will also work just fine with Xojo.<!-- end HubSpot Call-to-Action Code --></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
