Harvest provides several different ways to keep the repository and the 'real world' synchronized. But which tool should you use and when?
Harvest Software Change Manager all versions
A closer look at the various tools in the toolbox might help to clarify:
The hco command is the command-line equivalent of a checkout via Workbench, HarWeb, the VCI plugin or the Eclipse plugin. It can be used to check out files that will eventually be checked back into the repository, but also to check out files for purposes of synchronizing the computer's hard drive with the updated contents of the repository.
The one thing hco can do that hsync and hrefresh cannot is create empty directory structures. Its main limitation is that it can only checkout one package at a time. If in your repository, your directory structure contains empty directories and you need this exact structure to be maintained on your hard drive, hco is the tool you need to use.
These commands make up the Reference Directory Synchronization Utility.
Together these tools provide the following benefits:
The hsync command uses a single package or a list of multiple packages to update a file system directory (reference directory) so that it reflects the contents of a Harvest view path. hsync checks out the latest versions of items in the Harvest view and deletes files in the reference directory that no longer belong.
hrefresh works with hsync to synchronize a file system directory with the contents of a path in a Harvest view (working or snapshot). hrefresh is executed by server UDPs that may be post-linked to any Harvest process that updates the contents of data views, such as promote and demote processes. The post-link command provides hrefresh with the project, state, and package context information. hrefresh uses this information to determine which reference directories should be refreshed for that particular transaction. hrefresh then performs the necessary check-outs to synchronize the files on servers that are defined as reference computers.
More about the commands can be found here:
hrefresh Command-Refresh Directories
hsync Command-Synchronize Directory from View Path
And information about how to keep the Harvest repository and your deployment server in synch is here: Synchronize Reference Directories