Revision Control with Arch: Maintenance and Advanced Use
In the above cherry-picking example, Alice B. Hacker used a Web-accessible directory for her personal archive. This is convenient, but it poses a problem for disconnected use. What if Alice wanted to work from her laptop during a long airplane flight or train ride? She either would have to generate changeset tarballs with tla changes or star-merge her various branches manually one by one from her laptop to her Web-space archive when she reached a network connection. Fortunately, Arch permits the creation of archives that are simply mirrors of other archives:
$ tla make-archive -ls --mirror-from \ jrh@zork.net--signed \ sftp://jrh@zork.net/public_html/arch/
In this instance of make-archive, J. Random Hacker is creating an archive in his public_html directory on an Internet server. Once the mirror archive is created, it shows up in a tla archives listing as jrh@zork.net--signed-MIRROR. Now data can be pushed to it with a single command:
$ tla archive-mirror jrh@zork.net--signed
In addition to push mirrors that copy local archive data to remote systems, Arch allows pull mirrors that create local copies of remote archives:
$ tla make-archive -ls --mirror \ lnx-bbc-devel@zork.net--gar \ /var/tmp/gar-cache $ tla archive-mirror lnx-bbc-devel@zork.net--gar
This can be handy during disconnected operation, when a local branch may not be sufficient. Pull mirrors allow read-only access to a remote archive's data while off the Net.
One drawback to the jrh@zork.net—signed-MIRROR archive is that it is a separate signed archive in its own right. This means J. Random Hacker must sign each changeset as it is copied from the original archive to the mirror.
In some cases, this is the desired effect. A release manager personally vouches for each changeset that enters the public mirror, for example. In most cases, however, it is important simply to copy the existing signatures along with the changeset. This is achieved by creating a special file on the system where tla archive-mirror is run:
$ echo jrh@zork.net--signed > \ ~/.arch-params/signing/jrh@zork.net--signed-MIRROR
Mirrors are extremely useful, but they are, by nature, read-only. The only way changes can be committed to a mirror is through the original archive by way of tla archive-mirror.
Consider Alice's laptop mirror situation. While sitting in the observation car of Amtrak's Coast Starlight, she pulls out her laptop and does tla get to grab some code out of a local mirror of abh@zork.net--work. Somewhere in the Willamette Valley, she finds inspiration and completes a remarkably useful hack.
Any attempt to commit her changes would receive the message attempt to write directly to mirror, which means the commit failed. The simple solution is to wait until she reaches an Internet access point and use the undo and redo commands:
$ tla undo ,changes-to-mirror $ cd ~/real-project/ $ tla redo ~/mirror-checkout/,changes-to-mirror/ $ tla commit
This works fine if your changes are not enough to require more than one changeset. For longer detached sessions, you'll want to make a new local branch.
After her trip down the Pacific Coast, Alice takes the Zephyr to Chicago. It is a longer trip, and she found herself working in a local mirror of bob@entar.net--code on the foo--stable--2.4.2 code. After a few hours of work, she decides to move her changes to a new branch.
First, she makes a new archive and branch on her laptop:
$ tla make-archive -l abh@zork.net--laptop ~/arch $ tla my-default-archive abh@zork.net--laptop $ tla archive-setup foo--laptop-hacks--1.0
Next, she tags off the mirror branch to her new archive. She runs the tla logs command in shell backticks so she doesn't have to remember which patch level and version she was working in at the moment:
$ tla tag `tla logs -r -f | head -n 1` \ foo--laptop-hacks--1.0
Finally, Alice coerces the checked-out copy into believing it is the first revision in her new laptop-hacks branch:
$ tla sync-tree foo--laptop-hacks--1.0--base-0 $ tla set-tree-version foo--laptop-hacks--1.0
At this point, she has shifted her checked-out copy from the read-only mirror over to a read-write archive hosted on her laptop.
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
| Designing Electronics with Linux | May 22, 2013 |
| 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 |
- Linux Systems Administrator
- New Products
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Favorite (and easily brute-forced) pw's
14 min 46 sec ago - Have you tried Boxen? It's a
6 hours 6 min ago - seo services in india
10 hours 38 min ago - For KDE install kio-mtp
10 hours 38 min ago - Evernote is much more...
12 hours 38 min ago - Reply to comment | Linux Journal
21 hours 24 min ago - Dynamic DNS
21 hours 58 min ago - Reply to comment | Linux Journal
22 hours 56 min ago - Reply to comment | Linux Journal
23 hours 47 min ago - Not free anymore
1 day 3 hours 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!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
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
I cannot find the 3rd
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
Hi,
I can't seem to find the 3rd part of this article... is it available somewhere?
Thanks,
Bernt.