PerforceHistoryParser.java revision 4f7bde67c075330b1fbd5b9abe25e347eb8e5690
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/**
* Parse source history for a Perforce Repository
*
* @author Emilio Monti - emilmont@gmail.com
*/
public class PerforceHistoryParser implements HistoryParser {
private final static Pattern revision_regexp = Pattern.compile("#(\\d+) change \\d+ \\S+ on (\\d{4})/(\\d{2})/(\\d{2}) by ([^@]+)");
/* An entry finishes when a new entry starts ... */
}
/* New entry */
entry = new HistoryEntry();
} else {
} else {
}
}
}
}
/* ... an entry can also finish when the log is finished */
}
return entries;
}
private final static Pattern change_pattern = Pattern.compile("Change (\\d+) on (\\d{4})/(\\d{2})/(\\d{2}) by ([^@]+)@\\S* '([^']*)'");
/**
* Parse the history for the specified file.
*
* @param file the file to parse history for
* @param repository Pointer to the PerforceReporitory
* @return object representing the file's history
*/
return null;
}
if (file.isDirectory()) {
/* OUTPUT:
Directory changelog:
Change 177601 on 2008/02/12 by user@host 'description'
*/
}
} else {
}
return history;
}
}