What is a ShortId?
A short id is a 32-bit numebr that represents a particular file stored by the Vesta repository.
Each ShortId maps to a particular file on disk. To find it, you first need to find the directory that contains all the repository's stored files. You can print it from the shell with a simple command:
% echo `vgetconfig Repository metadata_root``vgetconfig Repository sid_dir` /var/lib/vesta/sid/
Below that directory are directories named by the first three hex digits of each ShortId (up to 4096 directories), below which are directories named by the second three hex digits of each ShortId (up to 4096 directories), below which are files named by the final two hex digits of each ShortId (up to 256 files). So if you have the ShortId 0x1a2b3c4d and your ShortId sotrage directory is as shown as above, it would be found in the file /var/lib/vesta/sid/1a2/b3c/4d.
Sometimes a ShortId will be printed simply in hex. At other times it will be printed as a full path. For example, the evaluator would print a text value stored in ShortId 0x1a2b3c4d as:
<file: /var/lib/vesta/sid/1a2/b3c/4d>
Finding the ShortId of an Immutable Source File
The ShortId of immutable files under /vesta is its inode through the repository's NFS interface. This means you can get the ShortId of an immutable file under /vesta with "ls -i":
% ls -i /vesta/vestasys.org/vesta/eval/112/src/progs.ves 2807348501 /vesta/vestasys.org/vesta/eval/112/src/progs.ves
Of course that's in decimal, and normally you need a ShortId it in hex:
% printf "%x\n" 2807348501 a754bd15
If you want to get it in one command line:
% printf "%x\n" `ls -i /vesta/vestasys.org/vesta/eval/112/src/progs.ves | cut -d ' ' -f 1` a754bd15
(Note that this only works under /vesta and does not work under /vesta-work.)