Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 14 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 12.4 ('Game Center')
Instant purchase and download via GumRoad!

FEATURE

Mercurial and Xojo

Code and Version Control go together like peanut butter and jelly

Issue: 12.4 (July/August 2014)
Author: Craig Boyd
Author Bio: Craig Boyd is currently an Oracle DBA for a well-known national retailer. But in his 17 years of IT experience, he has been everything from a PC Technician, iSeries System Administrator, iSeries Programmer, Sr. Technical Lead, and Data Modeler. He lives in the great state of Texas with his wife and two kids.
Article Description: No description available.
Article Length (in bytes): 26,548
Starting Page Number: 34
Article Number: 12408
Related Web Link(s):

http://bitbuckett.org
http://mercurial.selenic.com

Excerpt of article text...

Git has received plenty of attention from the Xojo community so I thought I would introduce everyone to my favorite distributed version control software: Mercurial. In this article I will walk you through the basic usage of Mercurial for version control. I won't cover the install process because, frankly, there are plenty of tutorials on that. I will also use the command line for this article because it is universal. (By that I mean that the commands are the same regardless of the platform.) Lastly, I will show you how to clone your project to BitBucket (http://bitbuckett.org) which is a great place for hosting your source code.

I am using Mercurial 2.7 (the current version is 2.9) and Xojo 2013r4.1. I provide this information as a point of reference only. We will not be doing anything that is specific to these versions.

Both Git and Mercurial are distributed version control systems. What this means is that every repository is a complete copy of the source and there is no central repository that acts as the hub. That is not to say that you can't do something like that, but the way Git and Mercurial work, that is not required.

I prefer Mercurial because it is very simple and straightforward. For me the learning curve just to do basic version control was about a day or less.

The Basics

I have created a simple project that is literally a "Hello World" kind of project. It is a desktop application with a single window and a button that, when clicked, will display a message box. I have not saved the project yet. First let's make sure that we have Mercurial in our path. Go to your OS shell and type "hg" <enter>. You should get a list of basic commands. If you don't, then Mercurial is either not in your path or not installed at all. Again, I won't go into any OS-specific details. There are plenty of articles already out there showing you how to install Mercurial for your OS platform. To get the specific version of Mercurial you are using, type "hg version" <enter>. That command will return something like the following:

...End of Excerpt. Please purchase the magazine to read the full article.