1433N/A * The contents of this file are subject to the terms of the 1433N/A * Common Development and Distribution License (the "License"). 1433N/A * You may not use this file except in compliance with the License. 1433N/A * language governing permissions and limitations under the License. 1433N/A * When distributing Covered Code, include this CDDL HEADER in each 1433N/A * If applicable, add the following below this CDDL HEADER, with the 1433N/A * fields enclosed by brackets "[]" replaced with your own identifying 1433N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1433N/A * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 1433N/A * Access to an AccuRev repository (here an actual user workspace) 1434N/A * AccuRev requires that a user logs into their system before it can be used. So 1434N/A * on the machine acting as the OpenGrok server, some valid user has to be 1434N/A * permanently logged in. (accurev login -n <user>) 1434N/A * It appears that the file path that is given to all these methods is the 1434N/A * complete path to the file which includes the path to the root of the source 1434N/A * location. This means that when using the -P option of OpenGrok to make all 1434N/A * the directories pointed to by the source root to be seen as separate projects 1434N/A * is not all as it would seem. The History GURU always starts building the 1434N/A * history cache using the source root. Well there is NO HISTORY for anything at 1434N/A * the source root because it is not part of an actual AccuRev depot. The 1434N/A * directories within the source root directory represent the work areas of 1434N/A * AccuRev and it is those areas where history can be obtained. This 1434N/A * implementation allows those directories to be symbolic links to the actual 1461N/A * There is only one associated AccuRev depot associated with workspaces. 1434N/A * The property name used to obtain the client command for this repository. 1434N/A * The command to use to access the repository if none was given explicitly 1462N/A * Create a new instance of type {@code AccuRev}. 1461N/A /* Strip off source root to get to workspace path. */ 1434N/A * Get an executor to be used for retrieving the history log for the given 1434N/A * file. (used by AccuRevHistoryParser). 1473N/A * @param file file for which history is to be retrieved (canonical path 1433N/A * @return An Executor ready to be started 1461N/A /* Strip off source root to get to workspace path. */ 1461N/A cmd.
add(
"keep");
// get a list of all 'real' file versions 1461N/A /* The only way to guarantee getting the contents of a file is to fire 1461N/A * off an AccuRev 'stat'us command to get the element ID number for the 1434N/A * subsequent 'cat' command. (Element ID's are unique for a file, unless 1434N/A * evil twins are present) This is because it is possible that the file 1434N/A * may have been moved to a different place in the depot. The 'stat' 1434N/A * command will produce a line with the format: 1434N/A * <filePath> <elementID> <virtualVersion> (<realVersion>) (<status>) 1461N/A * /./myFile e:17715 CP.73_Depot/2 (3220/2) (backed) 1461N/A /* This really gets the contents of the file */ 1461N/A * Get the path for the given file relative to the opengrok source root 1461N/A * @param file file to check 1461N/A * @return {@code /./} on error if file names the opengrok source directory, 1461N/A * the relative path prefixed with a {@code /.} otherwise. 1461N/A * Check if a given path is associated with an AccuRev workspace. 1461N/A * The AccuRev 'info' command provides a Depot name when in a known 1461N/A * workspace. Otherwise, the Depot name will be missing. 1473N/A * @param sourceHome The presumed path to an AccuRev workspace directory. 1461N/A * @return {@code true} if the given path is in the depot. 1461N/A // TODO: oh my goodness!!! Have fun invoking this for all files in a 1461N/A // TODO: is it ever possible to find a match if not 1461N/A // logged in? If not, return false immediately.