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] 967N/A * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 8N/A * Use is subject to license terms. 24N/A * Parse a stream of mercurial log comments. 635N/A /** Prefix which identifies lines with the description of a commit. */ 792N/A * Parse the history for the specified file or directory. If a changeset is 792N/A * specified, only return the history from the changeset right after the 792N/A * @param file the file or directory to get history for 792N/A * @param changeset the changeset right before the first one to fetch, or 792N/A * {@code null} if all changesets should be fetched 792N/A * @return history for the specified file or directory 792N/A * @throws HistoryException if an error happens when parsing the history 792N/A // If a changeset to start from is specified, remove that changeset 792N/A // from the list, since only the ones following it should be returned. 792N/A // Also check that the specified changeset was found, otherwise throw 574N/A * Process the output from the hg log command and insert the HistoryEntries 574N/A * into the history field. 574N/A * @param input The output from the process 1481N/A * @throws IOException If an error occurs while reading the stream 1481N/A // strip off hgsubversion UUID since 1479N/A // applies to directories only 1479N/A // If the file is not located under the source root, 635N/A * Decode a line with a description of a commit. The line is a sequence of 635N/A * XML character entities that need to be converted to single characters. 635N/A * This is to prevent problems if the log message contains one of the 635N/A * prefixes that {@link #processStream(InputStream)} is looking for (bug 635N/A * This method is way too tolerant, and won't complain if the line has 635N/A * a different format than expected. It will return weird results, though. 635N/A * @param line the XML encoded line 635N/A * @return the decoded description 635N/A // fetch the char values from the &#ddd; sequences 635N/A assert value ==
0 :
"description did not end with a semi-colon";