8N/A * The contents of this file are subject to the terms of the 8N/A * Common Development and Distribution License (the "License"). 8N/A * You may not use this file except in compliance with the License. 8N/A * language governing permissions and limitations under the License. 8N/A * When distributing Covered Code, include this CDDL HEADER in each 8N/A * If applicable, add the following below this CDDL HEADER, with the 8N/A * fields enclosed by brackets "[]" replaced with your own identifying 8N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1241N/A * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 1190N/A * An interface for an external repository. 8N/A * @author Trond Norbye 1241N/A * The command with which to access the external repository. Can be 1241N/A * {@code null} if the repository isn't accessed via a CLI, or if it 1241N/A * hasn't been initialized by {@link #ensureCommand} yet. 1461N/A * Check if the repository supports {@code getHistory()} requests for 1473N/A * the given file. For performance reasons subclasses should use some meta 1473N/A * information instead of actually hitting the repository to make that 1473N/A * @param file canonical path incl. source root. 1461N/A * @return {@code true} if the repository can get history for the given file. 765N/A * Check if the repository supports {@code getHistory()} requests for 765N/A * whole directories at once. 765N/A * @return {@code true} if the repository can get history for directories 1473N/A * Get the history log for the specified file or directory for all changesets. 1473N/A * @param file the file to get the history for (canonical path incl. source 765N/A * @return history log for file 765N/A * @throws HistoryException on error accessing the history 1473N/A * @see #getHistory(File, String) 771N/A * Get the history after a specified revision. 771N/A * The default implementation first fetches the full history and then 771N/A * throws away the oldest revisions. This is not efficient, so subclasses 771N/A * should override it in order to get good performance. Once every subclass 771N/A * has implemented a more efficient method, the default implementation 771N/A * should be removed and made abstract. 1473N/A * @param file the file to get the history for (canonical path incl. source 771N/A * @param sinceRevision the revision right before the first one to return, 771N/A * or {@code null} to return the full history 771N/A * @return partial history for file 771N/A * @throws HistoryException on error accessing the history 1473N/A * @see #getHistoryGet(String, String, String) 783N/A // If we want an incremental history update and get here, warn that 1327N/A +
". Falling back to slower full history retrieval.");
967N/A // Found revision right before the first one to return. 967N/A * Remove the oldest changeset from a list (assuming sorted with most 967N/A * recent changeset first) and verify that it is the changeset we expected 967N/A * @param entries a list of {@code HistoryEntry} objects 967N/A * @param revision the revision we expect the oldest entry to have 967N/A * @throws HistoryException if the oldest entry was not the one we expected 967N/A // TODO We should check more thoroughly that the changeset is the one 967N/A // we expected it to be, since some SCMs may change the revision 967N/A // numbers so that identical revision numbers does not always mean 967N/A // identical changesets. We could for example get the cached changeset 967N/A // and compare more fields, like author and date. 1473N/A +
"' not found in the repository");
1473N/A * Get an input stream that can be used to read a speciffic version of a 1473N/A * @param parent The name of the directory (canonical path incl. source root) 1473N/A * @param basename the name of The file to get. 1473N/A * @param rev The revision to get. 1467N/A * @return An input stream containing the correct revision or {@code null} 1473N/A * Checks whether this parser is able to annotate files. For performance 1473N/A * reasons subclasses should use some meta information instead of actually 1473N/A * hitting the repository to make that decision. 1473N/A * @param file canonical path incl. source root. 1473N/A * @return <code>true</code> if annotation is supported. 95N/A * Annotate the specified revision of a file. 1473N/A * @param file the file to annotate (canonical path incl. source root). 1182N/A * @param revision revision of the file. Either {@code null} or a none-empty 1467N/A * @return an <code>Annotation</code> object or {@code null} on error 1462N/A * @throws IOException if an error occurs 65N/A * Create a history log cache for all of the files in this repository. 766N/A * {@code getHistory()} is used to fetch the history for the entire 766N/A * repository. If {@code hasHistoryForDirectories()} returns {@code false}, 766N/A * this method is a no-op. 771N/A * @param cache the cache instance in which to store the history log 771N/A * @param sinceRevision if non-null, incrementally update the cache with 771N/A * all revisions after the specified revision; otherwise, create the full 771N/A * history starting with the initial revision 615N/A * @throws HistoryException on error 238N/A // If we don't have a directory parser, we can't create the cache 238N/A // this way. Just give up and return. 1461N/A +
"retrieval of history for directories is not implemented for " 1461N/A +
"this repository type.");
969N/A // Failed to get full history, so fail. 1182N/A // Failed to get partial history. This may have been caused 1182N/A // by changes in the revision numbers since the last update 1182N/A // (bug #14724) so we'll try to regenerate the cache from 969N/A // Failed to get partial history, now get full history instead. 969N/A // Got full history successfully. Clear the history cache so that 969N/A // we can recreate it from scratch. 203N/A * Update the content in this repository by pulling the changes from the 203N/A * upstream repository.. 203N/A * @throws Exception if an error occurs. 314N/A * Check if this it the right repository type for the given file. 1473N/A * @param file File to check if this is a repository for. If it is a relative 1473N/A * path, it gets interpreted relative to the current working directory. 1473N/A * So to be sure, it should be a canonical path incl. source root. 1473N/A * @return {@code true} if this is the correct repository for this 1473N/A * Check whether this repository supports sub reporitories (a.k.a. forests). 1473N/A * @return {@code true} if this repository supports sub repositories. 1461N/A * Get the date format to be used to parse dates from repository command 1461N/A * @return a new {@link DateFormat} instance. 1461N/A * @see #setDatePattern(String) 1473N/A * Check, whether the given command executes succesfully (i.e return code 1473N/A * @param args 0 .. command to execute, 1..n command line args 1473N/A * @return {@code true} on succes. 1241N/A * Set the name of the external client command that should be used to 1241N/A * access the repository wrt. the given parameters. Does nothing, if this 1241N/A * repository's <var>cmd</var> has already been set (i.e. has a 1241N/A * @param propertyKey property key to lookup the corresponding system property. 1241N/A * @param fallbackCommand the command to use, if lookup fails. 1241N/A * @return the command to use.