Revision Control with Arch: Maintenance and Advanced Use

Put a powerful revision control system to work for you with only Web and SSH software on the server side. Here's what you need to administer a software projet with Arch.
Branching without an Archive

Setting up mirrors before long disconnected sessions is a lot like packing for a trip: you always forget the one thing you really needed. It would be frustrating to plug your laptop in to the light socket of your mountain cabin only to find that your checked-out copy of some crucial code came from an HTTP archive.

Fortunately, you can use some of the same techniques to move a checked-out copy to a new branch even if you can't reach the old read-only archive.

Alice checked out a copy of a project called bar while sitting in an Internet café in Chicago. On her return trip to California, she decides to work on the code. After another hour of prodigious efforts, she decides yet again that it is time to make her own branch in which to work.

Because the original archive is inaccessible, tagging off a branch is impossible. Fortunately, much of the changelog and history information is present in the checked-out tree, so Alice temporarily backs out her changes with tla undo and then forces the checked-out copy into her new branch:

$ tla archive-setup bar--train-ride--1.0
$ tla set-tree-version bar--train-ride--1.0
$ tla add-log-version bar--train-ride--1.0
$ tla import

Once this is done, Alice runs tla redo and then tla commit. Now the revision she grabbed in Chicago is bar--train-ride--1.0--base-0, and her changes are bar--train-ride--1.0--patch-1.

Although this method is not perfect, it still is possible to star-merge to and from the original branch without trouble. If Alice found her work on the bar project to be more involved, she most likely would merge with the upstream archive and make a proper branch when she found Internet access again.

Tune in Next Time

You now know how to publish your archives to the Internet and how to work remotely with Arch. You even have a few tricks up your sleeve for when you make mistakes,

The third and final article in this series will show you how to administer a centralized official archive while retaining all of the benefits of Arch's distributed workings. You'll learn some tricks for scripting around your archives to create reports on development activity, as well as the creation of a test build infrastructure.

Nick Moffitt is a Linux professional living in the San Francisco Bay Area. He is the build engineer for the LNX-BBC Bootable Business Card distribution of GNU/Linux and the author of the GAR build system. When not hacking, he studies the history of urban public transportation.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I cannot find the 3rd

Anonymous's picture

I cannot find the 3rd installment of this great Arch tutorial.
It would appear that Linux Journal left it out for some reason.
There is another Linux Journal article by the same author titled "Arch for CVS users", but it appeared before the other two. There also was a tutorial on an earlier version of Arch in 2002 (when the utility was still named larch).

Regardless, I feel overwhelmed by the variety of improved CVS and project management systems with different philosophies out there. I would love to see an LJ article comparing the different options and listing some pros and cons. In particular, Arch vs. Subversion has been a hot topic lately. Now there is GIT. Where does it stand?

Where to find part 3 of this article

Bernt Hansen's picture

Hi,

I can't seem to find the 3rd part of this article... is it available somewhere?

Thanks,
Bernt.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix