This document summarizes the most common Vesta commands.
In the following examples:
The first step creates the directory named pkg in /vesta-work/username. You can then cd into that directory to do builds from it.
The second step deletes your current directory /vesta-work/username/pkg, so afterwards you will usually want to cd into some other directory, as shown in the third step.
The most common case is to create a branch off the main line of a package. For example, let NN denote a package version number. To create a branch named NN.bugfix off of the main package version pp/pkg/NN, do:
For example, the following command creates a branch off of the vesta/eval package:
$ vbranch vesta/eval/47.bugfix Creating branch /vesta/src.dec.com/vesta/eval/47.bugfix
The new directory /vesta/src.dec.com/vesta/eval/47.bugfix is like its own package: it has its own version numbers and its own checkout sub-directory. See the vbranch(1) man page for details.
Checking out a branch is essentially the same as checking out a regular package. Let branch be the name of a main-line package branch in the package pp/pkg. The following commands check out the package, using the name pkg for the local working directory.
If there is already a working directory named pkg, an alternative new name like pkg.1 is automatically synthesized.
Continuing the branch example from above, the following commands would checkout out the new branch:
$ cd /vesta-work/heydon $ vbranch vesta/eval/47.bugfix Reserving version /vesta/src.dec.com/vesta/eval/47.bugfix/1 Creating session /vesta/src.dec.com/vesta/eval/47.bugfix/checkout/1 Making working directory /vesta-work/heydon/eval $ cd eval
Checking in a package branch works identically to checking in a regular package version.
Continuing the branch example from above, here is the output produced by checking in the branch:
$ cd /vesta-work/heydon/eval $ vcheckin Checking in /vesta/src.dec.com/vesta/eval/47.bugfix/1 Deleting /vesta-work/heydon/eval $ cd
By default, vupdate(1) updates the imports of the package's .main.ves model only. To update other models within the package, use the -r switch. To see what vupdate would do without making any changes, use the -n switch.
The vimports(1) program lists the models imported directly or indirectly by a model. It can be used both on checked in and checked out packages. To see the transitive closure of the imports of a checked-out package, do:
The output produced by vimports can be quite verbose. The program includes several options for eliding parts of its output. The -depth option elides all imports below a certain depth. The -show option can then be used to selectively show the imports below some package. See the man page for details.
To use access the derived files produced by a package build, you have to instruct the evaluator to copy (parts of) the build's result binding into your normal file system. This is done using the evaluator's -shipfrom and -shipto arguments.
Here, src is the (sub-)binding within the package result to be shipped, and dest is the destination directory in the normal file system to which the result should be copied. To create symbolic links rather than full copies, use the -s switch. Warning: the referents of such symbolic links may be deleted by the weeder, so the -s switch should be used only to ship test versions of deriveds for temporary use.
For example, the result value produced by building the examples/hello_c package is a singleton binding containing the name progs. Here's the result value as printed by the evaluator:
Return value of `.main.ves': [ progs=[ hello=] ]
To ship the hello executable to the directory ~/bin, you would run:
vmake -shipfrom progs -shipto ~/bin
To create a symbolic link rather than a full copy, use the -s switch:
vmake -s -shipfrom progs -shipto ~/bin
Allan Heydon (caheydon@yahoo.com)