Search code examples
command-line-interfaceaccurev

Search accurev depot for unused workspaces


Is there anyway using accurev CLI that I can search for old unused workspaces? Some way that I can get a list of workspaces that havent been accessed in x amount of days for example?


Solution

  • The best you can do is to create a script.

    The logic will be to run the command 'accurev show -fx wspaces'.

    From this output, you will see a "Trans" value. Example output below.

    Trans="196431"

    This value is the workspace transaction level based upon the last time the workspace was successfully updated.

    You can run the command 'accurev hist -fx -p depotname -t TransNumber'

    From ths output, you will see a "time" value. Example output below.

    time="1361564066"

    This is the time value per workspace transaction level.

    You will convert this into a readable format using the command:

    perl -e "print scalar localtime(1361564066);"

    Example output. Fri Feb 22 15:14:26 2013

    That all being said, you can compare this time against the current time to determine any old workspaces that have not been in use.