提交 f9d2bb7f 编写于 作者: K kohsuke

[FIXED HUDSON-2428]

This is caused by incomplete changelog.xml.

Not sure why you have changelog.xml parsed by CVS if you only use Perforce, but improved Hudson so that this is handled more gracefully.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@12531 71c3de6d-444a-0410-be80-ed276b4c234a
上级 d374ff4b
......@@ -81,6 +81,10 @@ public final class CVSChangeLogSet extends ChangeLogSet<CVSChangeLog> {
for(int i=r.size()-1; i>=0; i--) {
CVSChangeLog log = r.get(i);
boolean merged = false;
if(!log.isComplete()) {
r.remove(log);
continue;
}
for(int j=0;j<i;j++) {
CVSChangeLog c = r.get(j);
if(c.canBeMergedWith(log)) {
......@@ -106,6 +110,14 @@ public final class CVSChangeLogSet extends ChangeLogSet<CVSChangeLog> {
private String msg;
private final List<File> files = new ArrayList<File>();
/**
* Returns true if all the fields that are supposed to be non-null is present.
* This is used to make sure the XML file was correct.
*/
public boolean isComplete() {
return date!=null && time!=null && msg!=null;
}
/**
* Checks if two {@link CVSChangeLog} entries can be merged.
* This is to work around the duplicate entry problems.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册