Revision Control with Arch: Introduction to Arch
Arch was originally a set of shell scripts and wrappers around Tom Lord's hackerlabs libraries. The name of the program in those days was larch, and it was more than a little clumsy to use. The client now has been entirely rewritten in C and is called tla, which stands for Tom Lord's Arch. The interface is still not perfect, but it is good enough for regular use by a skilled developer. Packages of tla are available for most GNU/Linux distributions (see the on-line Resources).
Once you have tla installed, it's good to test it by checking out some code. Arch stores your data in a directory known as an archive. Within the archive, data is organized into nested categories: projects (the name of the work as a whole), branches (a particular thread of development or other descriptive term) and versions (a simple numerical indicator you can use to indicate how far a specific branch has progressed).
The first step to getting some code is to register a public archive so that Arch associates a name with the archive location:
$ tla register-archive http://www.lnx-bbc.org/arch
You should now see the lnx-bbc-devel@zork.net--gar archive listed when you run tla archives. If you're curious about what projects are stored in there, you can use the tla abrowse command to get a full list:
$ tla abrowse lnx-bbc-devel@zork.net--gar
lnx-bbc-devel@zork.net--gar
lnx-bbc
lnx-bbc--research
lnx-bbc--research--0.0
base-0 .. patch-10
lnx-bbc--stable
lnx-bbc--stable--2.1
base-0 .. patch-29
scripts
scripts--gargoyle-bin
scripts--gargoyle-bin--1.0
base-0 .. patch-7
This listing tells us that the lnx-bbc-devel@zork.net--gar archive has two projects, lnx-bbc and scripts. The lnx-bbc project has two branches, research and stable. The lnx-bbc--research branch has only one version (0.0) and that version has had ten changes recorded in the archive. The lnx-bbc--stable branch has only one version (2.1) with 29 changesets.
Because you now have the LNX-BBC public archive registered in your local listing, you can check out a copy of the LNX-BBC stable branch:
$ tla get \ lnx-bbc-devel@zork.net--gar/lnx-bbc--stable lnxbbc
Once it finishes downloading and applying patchsets, you should have a directory named lnxbbc/ that is full of files. To simulate a change in the code, cd into lnxbbc/ and edit robots.txt to add a new comment somewhere.
Now that you have made a change, running tla what-changed should print M robots.txt to indicate that robots.txt has been modified. To get the details of the change, you can run tla what-changed --diffs, which should print out a diff file ready to be sent back to the project's development group:
--- orig/robots.txt +++ mod/robots.txt @@ -1,3 +1,5 @@ +# Welcome, robots! + User-agent: * Disallow: /garchive/ Disallow: /cgi-bin/
The drawback to this is that the diff does not indicate metadata changes. Moved files will not be listed, and new files will not be created when another developer runs this diff through patch. In order to submit a more complicated change to the project maintainers, you must generate a changeset.
In Arch, a changeset is represented as a directory tree full of bookkeeping files, patches, new files and removed files. The best contribution technique is to create a changeset directory and then tar it up for delivery:
$ tla changes -o ,,new-robot-comment $ tar czvf my-changes.tar.gz ,,new-robot-comment/
Arch ignores files beginning with two commas, an equal sign and a few other special characters. By using a ,, at the start of our changeset directory name, we avoid the annoyance of Arch complaining that our new directory doesn't exist in the archive. It is probably good practice to use your e-mail address or some other identifier in the tarball filename and changeset directory name.
Now and then you'll want to download the latest changes to the project. This is as simple as running tla update from inside the checked-out copy.
Arch first runs tla undo to set aside your local changes before applying new changesets. Once all the patches have been applied, it runs tla redo to re-apply your local changes.
All of the tla commands introduced above require a functioning network connection to the lnx-bbc.org system that hosts the archive. For disconnected use, you need to create a local archive and then make a branch within it.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
- RSS Feeds
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- A Topic for Discussion - Open Source Feature-Richness?
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Validate an E-Mail Address with PHP, the Right Way
- What's the tweeting protocol?
- Tech Tip: Really Simple HTTP Server with Python
- Kernel Problem
3 min 56 sec ago - BASH script to log IPs on public web server
4 hours 30 min ago - DynDNS
8 hours 6 min ago - Reply to comment | Linux Journal
8 hours 39 min ago - All the articles you talked
11 hours 2 min ago - All the articles you talked
11 hours 5 min ago - All the articles you talked
11 hours 7 min ago - myip
15 hours 31 min ago - Keeping track of IP address
17 hours 22 min ago - Roll your own dynamic dns
22 hours 36 min ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
Larry McVoy at SCALE 3x
If you're interested in revision control software Larry McVoy of BitKeeper fame, will be speaking about distributed revision control systems at the upcoming Southern California Linux Expo
Re: Revision Control with Arch: Introduction to Arch
Damn lag...
Re: Revision Control with Arch: Introduction to Arch
I thought TLA was Three Letter Acronym.
Re: Revision Control with Arch: Introduction to Arch
I had played around with arch (and arx) a while ago and also found it fairly confusing. I was reading this hoping that things have changed for the better, but it doesn't sound like it has.
Reason being that I've got two areas I do development on that can't talk to one another via a network, yet I'd like to keep their CVS repositories sync'd up. One option would be to copy the repositories over, but I didn't start out that way. I made two separate repositories and just grab snapshots from one and integrate it to the other using CVS tags to manage revisions.
This works ok, but seems a little clunky. If I'm reading it right, arch be a natural for such an environment, once I get past the initial learning curve.
Any thoughts?
Re: Revision Control with Arch: Introduction to Arch
I am pretty sure Arch would be a good fit. You'd probably do something like this:
Create an Arch archive at Site A and an Arch archive at Site B. Commit any changes into the archive where you are at.
Create an Arch archive on a USB stick. Use 'tla star-merge' to merge the site archive with the USB stick archive.
Re: Revision Control with Arch: Introduction to Arch
well, I tried tla. It's horrible complicated. Until you find out how it works, you have set up 10 local subversions. Seriously. I think its not worth, even if subversion might have some downsides.
Re: Revision Control with Arch: Introduction to Arch
So a GUI arch is needed.
Not a GUI, just a sane interf
Not a GUI, just a sane interface.
Re: Revision Control with Arch: Introduction to Arch
Actually, "tla" stands for "true love always", not "tom lord's arch"
although the coincidence of acronym there is part of why the
name "tla" was chosen ("tla", as acronym, provides lots of
plausible deniability --- for example, it also stands for "three letter
acronym".)