Thursday, May 15, 2008

AccuRev on Linux Quickstart

How do I checkout an AccuRev workspace? How do I work with it?

AccuRev installation is easy on Linux. Get their installer, run it, and follow the prompts. Choose a "client" installation instead of a "full" installation. When it asks for the "hostname", put in exactly that - an IP or a hostname. Don't include the port. It asks for the port in the next prompt.

Here are some commands:

# Create the workspace
# I think -b denotes "backing" as in backing stream
accurev show -p PROJECT_Unreleased streams accurev mkws -w new_workspace_name -b Stream\ for\ Cross-Developer\ Testing -l ./local_directory

# Set your AccuRev username in the environment for commands that follow
accurev login mikedll

# Sometimes the client loses time sync with the server, and we
# had to do this before running commands.
sudo accurev synctime

# shows status of modifed, and not in default group
# changes that need to be promoted/committed.
accurev stat -n

# shows overlap only
# changes that may conflict with changes upstream
accurev stat -o

# merges conflicts in overlapp group
# note that sometimes you have to go in and merge them yourself with an editor
accurev merge -o

# Keep modified group into the default group,
# get updates, and promote the default group
# this will be a typical promote/commit process.
accurev keep -m
accurev update
accurev promote -d

If you get the error Element would be stranded, this could be avoided by "purging" your private changes of a file that has been defuncted, or otherwise messed with, in the parent stream. Unfortunately I don't have that command here.