HCO -vn option to checkout a specific version

book

Article ID: 196368

calendar_today

Updated On:

Products

CA Harvest Software Change Manager CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

I would like to get the previous version(s) of file(s) to be checked out with the hco utility.
What do I have to set for the -vn option. -vn -1 is not working and in the documenation I could not find an example.

Environment

Release : 13.0.3

Component : CA Harvest Software Change Manager

Resolution

The "hco" command line utility does not offer a way to check out the "n-1" version of all the files in a package. Possible alternatives include:

- Using snapshots to capture the state of your project at key deployment intervals and then check out from the snapshot if you need to revert back to the previous version

- Just before checkout of a new version, set a pre-link script that would zip or tar the current folder structure to preserve the previous state. Then if rollback is needed, unzip the archived.

If neither of these options accomplish the goal and you want to archive the previous version of the files in the package and no other files, attached is an example Windows batch script to show how this might be done. It will take in broker, project, state, userid and password, package and client path and then check out the n-1 version of every file in the package. If there’s a version 0 file in the package it will check out version 0.

This is offered as an example and place for you to start in customizing to make this into the utility you need to accomplish your goal. Feel free to make any changes you need to.  This script is offered as-is and is not officially supported.

Attachments

1596205772972__checkout_previous_bat.txt get_app