0N/A * The contents of this file are subject to the terms of the 0N/A * Common Development and Distribution License (the "License"). 0N/A * You may not use this file except in compliance with the License. 0N/A * language governing permissions and limitations under the License. 0N/A * When distributing Covered Code, include this CDDL HEADER in each 0N/A * If applicable, add the following below this CDDL HEADER, with the 0N/A * fields enclosed by brackets "[]" replaced with your own identifying 0N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1403N/A * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 0N/A * The HistoryGuru is used to implement an transparent layer to the various 0N/A * source control systems. 0N/A /** The one and only instance of the HistoryGuru */ 353N/A /** The history cache to use */ 0N/A * Creates a new instance of HistoryGuru, and try to set the default 0N/A * source control system. 772N/A "Failed to initialize the history cache",
he);
772N/A // Failed to initialize, run without a history cache 0N/A * Get the one and only instance of the HistoryGuru 0N/A * @return the one and only HistoryGuru instance 772N/A * Return whether or not a cache should be used for the history log. 772N/A * @return {@code true} if the history cache has been enabled and 772N/A * initialized, {@code false} otherwise 864N/A * Get a string with information about the history cache. 864N/A * @return a free form text string describing the history cache instance 864N/A * @throws HistoryException if an error occurred while getting the info 84N/A * Annotate the specified revision of a file. 84N/A * @param file the file to annotate 84N/A * @param rev the revision to annotate (<code>null</code> means BASE) 87N/A * @return file annotation, or <code>null</code> if the 87N/A * <code>HistoryParser</code> does not support annotation 1182N/A "Cannot get messages for tooltip: ",
ex);
1182N/A // !!! cannot do this because of not matching rev ids (keys) 1190N/A // first is the most recent one, so we need the position of "rev" 1182N/A // until the end of the list 878N/A //if (hent.indexOf(rev)>0) { 1182N/A // hent = hent.subList(hent.indexOf(rev), hent.size()); 1190N/A //TODO this is only for mercurial, for other SCMs it might also 1190N/A // be a problem, we need to revise how we shorten the rev # for 1190N/A * Get the appropriate history reader for the file specified by parent and 25N/A * @param file The file to get the history reader for 615N/A * @throws HistoryException If an error occurs while getting the history 1183N/A * @return A HistorReader that may be used to read out history data for a 829N/A * Get the history for the specified file. 829N/A * @param file the file to get the history for 829N/A * @return history for the file 829N/A * @throws HistoryException on error when accessing the history 839N/A * Get the history for the specified file. 839N/A * @param file the file to get the history for 839N/A * @param withFiles whether or not the returned history should contain 839N/A * a list of files touched by each changeset (the file list may be skipped 839N/A * if false, but it doesn't have to) 839N/A * @return history for the file 839N/A * @throws HistoryException on error when accessing the history 0N/A * Get a named revision of the specified file. 0N/A * @param parent The directory containing the file 0N/A * @param basename The name of the file 0N/A * @param rev The revision to get 0N/A * @return An InputStream containing the named revision of the file. 0N/A * Does this directory contain files with source control information? 258N/A * @param file The name of the directory 1190N/A * @return true if the files in this directory have associated revision 93N/A * Check if we can annotate the specified file. 93N/A * @param file the file to check 93N/A * @return <code>true</code> if the file is under version control and the 93N/A * version control system supports annotation 1403N/A * Get the last modified times for all files and subdirectories in the 1403N/A * @param directory the directory whose files to check 1403N/A * @return a map from file names to modification times for the files that 1403N/A * the history cache has information about 993N/A * recursivelly search for repositories with a depth limit 993N/A * @param files list of files to check if they contain a repo 993N/A * @param repos list of found repos 993N/A * @param ignoredNames what files to ignore 993N/A * @param recursiveSearch whether to use recursive search 1190N/A * @param depth current depth - using global scanningDepth - one can limit 1183N/A * this to improve scanning performance 1183N/A +
file +
"', could not instantiate the repository.",
ie);
1250N/A // Not a repository, search it's sub-dirs 1250N/A "Failed to get sub directories for '" 1250N/A +
"', check access permissions.");
460N/A // @TODO: Search only for one type of repository - the one found here 1190N/A "Failed to get sub directories for '" 1182N/A +
"', check access permissions.");
1190N/A // Search only one level down - if not: too much 1182N/A // stat'ing for huge Mercurial repositories 99N/A * Search through the all of the directories and add all of the source 99N/A * repositories found. 99N/A * @param dir the root directory to start the search in. 203N/A * Update the source the contents in the source repositories. 668N/A * Update the source the contents in the source repositories. 1190N/A "An error occured while creating cache for " +
path +
" (" 1183N/A +
type +
" repository in " +
path +
": Missing SCM dependencies?");
771N/A "Failed to retrieve latest cached revision for %s",
1183N/A "Received interrupt while waiting for executor to finish",
exp);
795N/A // The cache has been populated. Now, optimize how it is stored on 795N/A // disk to enhance performance and save space. 795N/A "Failed optimizing the history cache database",
he);
203N/A * Create the history cache for all of the repositories 771N/A * Ensure that we have a directory in the cache. If it's not there, fetch 771N/A * its history and populate the cache. If it's already there, and the 771N/A * cache is able to tell how recent it is, attempt to update it to the 771N/A * most recent revision. 651N/A * @param file the root path to test 678N/A * @throws HistoryException if an error occurs while accessing the 771N/A // no repository -> no history :( 771N/A // Cache already exists, but we don't know how recent it is, 771N/A // so don't do anything. 771N/A // Create cache from the beginning if it doesn't exist, or update it 771N/A // incrementally otherwise. 664N/A * Invalidate the current list of known repositories! 664N/A * @param repos The new repositories 1183N/A "Failed to instanciate internal repository data for " 1183N/A +
"', could not instantiate the repository.",
ex);