Posts Tagged ‘Stream-based’

AccuRev TimeSafe makes retrieving code from "anywhen" easy

October 24th, 2007

One of the problems frequently faced in traditional branch-and-label version control systems is how to retrieve a particular configuration of code from the past if it wasn’t tagged or labeled at the time. You forgot to label the release-candidate-6 branch from last month before building it, and now you have no way to accurately pull the correct files.

AccuRev, through a combination of its TimeSafe architecture and the power of its streams, makes this easy. Say you have a development process where code follows a promotion model from individual contributors to an Integration area, to a QA area, to Production. The release candidates are based on the QA stream. The QA team built and released RC5 on Friday, June 7th at 11:00 pm, but unfortunately neglected to snapshot it. In the following weeks, additional changes were promoted to the QA stream.

To get guaranteed access to the code configuration as it existed for RC5, you could do the following:
* create a stream off of QA and assign it a time basis of June 7th, 11:00 pm
* run “accurev pop” to retrieve the contents to disk

anywhen_stream.jpg

It’s as easy as that! Furthermore, if you want to automate this process, how about creating a stream for all your source pulls, call it something like <depot>_source_pull (or equivalent, doesn’t really matter). Then, whenever you need source files, use the “accurev chstream” command to first move it to whatever parent stream you want the files from and second to change the time-basis on it to the correct time or transaction. Lastly, you pop from that time-basis stream to place the files in whatever location you want:

“accurev chstream -s <depot>_source_pull -b <depot>_target_stream”
“accurev chstream -s <depot>_source_pull -t 356″
“accurev pop -R -O -v <depot>_source_pull -L c:\build_dir .”

There are other ways to skin this cat in AccuRev, as there usually are, but this is a quick way to get guaranteed results.

Agile Programmable Completion – AccuRev + GNU Bash

October 18th, 2007

When at the command line (CLI), productivity means keeping your hands on the keyboard. But once your fingers have memorized all the commands, flags, static arguments, and common usage patterns — can you still get faster?

Yes.

Programmable completion is a shell facility that allows for customizing the command line in real-time as it is typed. Also referred to as “TAB Completion”, many shells in both Linux and Windows have a default implementation that support completion on filenames and directories. If you’re lucky, you’ll even get environment variables and functions.

Let’s move to software configuration management (SCM). Various branch and label-based SCM systems like CVS have basic tab completion for commands and flags. Thats a good start. But an agile user needs a context-sensitive, custom-data completion facility. What you ~really~ want is completion on your own data — branch names, labels, usernames, etc.

Users of stream-based AccuRev are in luck.

Do you use AccuRev on Linux? If so, download the latest GNU Bash (2.05+) completion for AccuRev 4.5.x. Here is the README. You’ll never have to memorize flags or type stream names again.

Coming in Part 2 — Support for Windows users.

/happy tabbing/ – dave