PR: MPCHANGELOG-25

Submitted by: Neil Palmer
Reviewed by:  Brett Porter

Various clearcase fixes


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@179949 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett committed 2005-06-04 05:07:07 +00:00
1 parent f669b454b3
commit 4861fff59d
8 files changed
+83 -5

No files matched your search

+1
View File
@@ -104,6 +104,7 @@
tag="${maven.changelog.tag}"
repositoryConnection="${_connection}"
dateFormat="${maven.changelog.dateformat}"
commentFormat="${maven.changelog.commentFormat}"
/>
<doc:jsl
@@ -105,6 +105,11 @@ public abstract class AbstractChangeLogGenerator implements ChangeLogGenerator,
*/
protected InputStream in;
/**
* The comment format string used in interrogating the RCS.
*/
protected String commentFormat;
/** Log */
private static final Log LOG = LogFactory.getLog(AbstractChangeLogGenerator.class);
@@ -145,6 +150,9 @@ public abstract class AbstractChangeLogGenerator implements ChangeLogGenerator,
}
setConnection(changeLogExecutor.getRepositoryConnection());
// set the comment query string for the RCS.
setCommentFormat(changeLogExecutor.getCommentFormat());
}
/**
@@ -415,6 +423,24 @@ public abstract class AbstractChangeLogGenerator implements ChangeLogGenerator,
this.connection = connection;
}
/**
* Returns the commentFormat used to interrogate the RCS.
* @return String
*/
public String getCommentFormat()
{
return commentFormat;
}
/**
* Sets the commentFormat.
* @param commentFormat The commentFormat to set
*/
public void setCommentFormat(String commentFormat)
{
this.commentFormat = commentFormat;
}
/**
* Logs the pertinent details to the logging system (info level)
* @param exe The object to log
@@ -123,6 +123,13 @@ public class ChangeLog
FACTORIES.put( "vss", "org.apache.maven.vsslib.VssChangeLogFactory" );
}
/**
* Comment format string used for interrogating
* the revision control system.
* Currently only used by the ClearcaseChangeLogGenerator.
*/
private String commentFormat;
/**
* Set the ChangeLogFactory class name. If this isn't set, the factory
* defaults to Maven's build in CVS factory.
@@ -630,4 +637,22 @@ public class ChangeLog
this.outputEncoding = outputEncoding;
}
/**
* Returns the commentFormat used to interrogate the RCS.
* @return String
*/
public String getCommentFormat()
{
return commentFormat;
}
/**
* Sets the commentFormat.
* @param commentFormat The commentFormat to set
*/
public void setCommentFormat(String commentFormat)
{
this.commentFormat = commentFormat;
}
} // end of ChangeLog
@@ -63,11 +63,22 @@ public class ClearcaseChangeLogGenerator extends AbstractChangeLogGenerator {
Commandline command = new Commandline();
command.setExecutable("cleartool");
command.createArgument().setValue("lshistory");
StringBuffer format = new StringBuffer();
format.append("NAME:%En\\n");
format.append("DATE:%Nd\\n");
format.append("COMM:%-12.12o - %o - %c - Activity: %[activity]p\\n");
format.append("COMM:%-12.12o - ");
String commentFormat = getCommentFormat();
if (commentFormat == null)
{
format.append("%Sn - %c - Activity: %[activity]p\\n");
}
else
{
format.append(commentFormat);
}
format.append("USER:%-8.8u\\n");
command.createArgument().setValue("-fmt");
@@ -176,7 +176,7 @@ public class ClearcaseChangeLogParser implements ChangeLogParser {
return;
}
// do not add if the operation is not checkin
if (entry.getComment().indexOf("- checkin") == -1)
if (entry.getComment().indexOf("checkin ") == -1)
{
return;
}
@@ -185,6 +185,8 @@ public class ClearcaseChangeLogParser implements ChangeLogParser {
+ entry.getAuthor() + entry.getComment();
file.setRevision("");
if (!entries.containsKey(key))
{
entry.addFile(file);
+5 -2
View File
@@ -113,14 +113,17 @@
<a href="${repository}${name}?ac=22">${name}</a>
<a href="${repository}${name}?ac=64&amp;rev1=${revision}">v${revision}</a>
</j:when>
<j:when test="${pom.repository.connection.startsWith('scm:clearcase')}">
<a href="${repository}${name}${oneRepoParam}">${name}</a>
</j:when>
<j:when test="${repository.indexOf('cvsmonitor.pl') > 0}">
<j:set var="module" value="${oneRepoParam.replaceAll('^.*(&amp;module=.*?(?:&amp;|$)).*$','$1')}"/>
<a href="${repository}?cmd=viewBrowseFile${module}&amp;file=${name}">${name}</a>
<a href="${repository}?cmd=viewBrowseVersion${module}&amp;file=${name}&amp;version=${revision}">v${revision}</a>
</j:when>
<j:otherwise>
<a href="${repository}${name}${oneRepoParam}">${name}</a>
<a href="${repository}${name}?rev=${revision}&amp;content-type=text/vnd.viewcvs-markup${multiRepoParam}">v${revision}</a>
<a href="${repository}${name}${oneRepoParam}">${name}</a>
<a href="${repository}${name}?rev=${revision}&amp;content-type=text/vnd.viewcvs-markup${multiRepoParam}">v${revision}</a>
</j:otherwise>
</j:choose>
+1
View File
@@ -26,6 +26,7 @@
</properties>
<body>
<release version="1.8-SNAPSHOT" date="in SVN">
<action dev="brett" type="fix" issue="MPCHANGELOG-25" due-to="Neil Palmer">Corrected link for viewcvs configured with muliple cvs repository.</action>
<action dev="brett" type="add" issue="MPCHANGELOG-49" due-to="Freddy Mallet">Add VSS support</action>
<action dev="brett" type="fix" issue="MPCHANGELOG-57" due-to="Sebastian Scholze">Correctly parse (no author) from SVN logs</action>
<action dev="brett" type="fix" issue="MPCHANGELOG-53" due-to="Kenneth Leider">Add CVS monitor support</a>
+9
View File
@@ -84,6 +84,15 @@
tag. Currently, this is supported for CVS only.
</td>
</tr>
<tr>
<td>maven.changelog.commentFormat</td>
<td>Yes</td>
<td>
Specifies the RCS query to use when generating the comment for change log.
This is currently only used by the Clearcase change log. The default value is
<code>%Sn - %c - Activity: %[activity]p\\n</code> days.
</td>
</tr>
<tr>
<td>maven.changelog.factory</td>
<td>Yes</td>