Revision Control with Arch: Introduction to Arch

 in
Whether you're moving up from CVS or just getting serious about a revision control system, here's a powerful tool that will keep records of changes and keep your projects under control.

Arch quickly is becoming one of the most powerful tools in the free software developer's collection. This is the first in a series of three articles that teaches basic use of Arch for distributed development, to manage shared archives and script automated systems around Arch projects.

This article shows you how to get code from a public Arch archive, contribute changesets upstream and make a local branch of a project for disconnected use. In addition, it provides techniques to improve performance of both local and remote archives.

History of Revision Control

Revision control is the business of change management within a project. The ability to examine work done on a project, compare development paths and replicate and undo changes is a fundamental part of free software development. With so many potential contributors and such rapid release of changes, the tools developers use to manipulate these changes have had to evolve quickly.

Early revision control was handled with tape backups. Old versions of a project would be dragged out of backup archives and compared line by line with the new copy. The process of restoring a backup from tape is not quick, so this is not an efficient method by any means.

To work around this lag, many developers kept old copies of files around for comparison, and this was soon integrated into early development tools. File-based revision control, such as that used by the Emacs editor, uses numbered backup files so you can compare foo.c~7~ with foo.c~8~ to see what changed. Versioned backup files even were integrated into the filesystem on some early proprietary operating systems.

For nearly two decades, the preferred format for third-party contributions to free software projects has been a patch file, sometimes called a diff. Given two files, the diff program generates a listing that highlights the differences between them. To apply the changes specified in the diff output, a user need only run it through the patch program.

In the 1990s, the Concurrent Versions System (CVS) became the default for managing the changes of a core group of developers. CVS stores a list of patches along with attribution information and a changelog. A primitive system of branching and merging allows users to experiment with various lines of development and then fold successful efforts back into the main project.

CVS has its limitations, and they are becoming a burden for many projects. First, it does not store any metadata changes, such as the permissions of a file or the renaming of a file. In addition, check-ins are not grouped together in a set, making it difficult to examine a change that spanned multiple files and directories. Finally, nearly all operations on a remote CVS repository require that a new connection be opened to the server, making it difficult for disconnected use.

Efforts such as the Subversion Project have come a long way toward fixing the flaws found in CVS. Subversion is effectively a CVS++, and it supports file metadata change logging and atomic check-ins. What it still requires is a centralized server on the network that all clients connect to for revision management operations.

Distributed Revision Control Systems

A new generation of revision control systems has sprung up in the past few years, all operating on a distributed model. Distributed revision control systems do away with a single centralized repository in favor of a peer-to-peer architecture. Each developer keeps a repository, and the tools allow easy manipulation of changes between systems over the network.

Projects such as Monotone, DARCS and Arch are finding popularity in a world where free software development happens outside of well-connected universities, and laptops are much more common.

One of the most promising distributed systems today is GNU Arch. Arch handles disconnected use by encouraging users to create archives on their local machines, and it provides powerful tools for manipulating projects between archives. Arch lacks any sort of dedicated server process and uses a portable subset of filesystem operations to manipulate the archive. Archives are simply directories that can be made available over the network using your preferred remote filesystem protocol. In addition, Arch supports archive access over HTTP, FTP and SFTP.

One advantage to not having a dedicated dæmon is that no new code is given privilege on your server machine. Thus, your security concerns are with your SSH dæmon or Web server, which most system administrators already are keeping tabs on.

Another advantage is that for most tasks no root privilege is needed to make use of Arch. Developers can begin using it on their own machines and publish archives without even installing Arch on the Web server machine. This affects the pattern of adoption as well. Using CVS or Subversion is a top-down decision made for an entire project team, although Arch can be adopted by one or two developers at a time until everyone in the group is up to speed.

______________________

Comments

Comment viewing options

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

Larry McVoy at SCALE 3x

Anonymous's picture

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

Anonymous's picture

Posted on Monday, November 01, 2004 by Nick Moffitt

Damn lag...

Re: Revision Control with Arch: Introduction to Arch

Anonymous's picture

I thought TLA was Three Letter Acronym.

Re: Revision Control with Arch: Introduction to Arch

f15_eagle's picture

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

Anonymous's picture

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

Anonymous's picture

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

Anonymous's picture

So a GUI arch is needed.

Not a GUI, just a sane interf

Anonymous's picture

Not a GUI, just a sane interface.

Re: Revision Control with Arch: Introduction to Arch

Anonymous's picture

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".)

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState