Hi,
This affects us too, in fact in a bigger way, since we tag everything to be
built. I was looking into this over the weekend, and I believe the problem was
due to the version of the Ant CVS ChangeLogTask being used (it may have been a
bug, or it may have been intended, but either way, it's been resolved in Ant
1.7.1).
I was able to get the 1.235 Hudson source, and update it to use the latest Ant
task, which has partially resolved this issue. Here's everything I had to do
(I'll be updating this source shortly):
1. Replace everything under hudson.org.apache.tools.ant.taskdefs (and sub-
packages) with the latest Ant source.
2. Made some changes to the Ant task (I tried to minimize this to simplify
future updates to the task):
a. Re-introduced the one change Kohsuke did related to timezone issues
(ChangeLogTask.java:235-252).
b. Re-introduced the cvsExe property to the task (AbstractCvsTask.java:151,160-
162,767) (Ant 1.7.1 no longer allows you to specify the CVS binary to use, and
instead assumes that "cvs" will be in your path, Hudson still allows you to
specify the "cvs" location, so I thought this would be a good idea to add it).
c. Added " * @version Ant 1.7.1 (Copied into Hudson)" to JavaDoc so that we can
keep track of which version of the Ant task is being used.
3. Modified hudson.scm.CVSSCM to account for changes in the Ant task:
a. Made "changeLogFile" parameter final in calcChangeLog so that it can be
accesssed from an inner class (CVSSCM:701).
b. Modified to pass the changeLogFile location to the Ant task using setDestfile
(File) instead of setDeststream(OutputStream) (CVSSCM:760, CVSSCM:796).
c. Modified to pass branch to Ant task using setTag(String) instead of setBranch
(String) (CVSSCM:761)
d. Modified the way we pass changedFiles to the Ant task (CVSSCM:773-783)
e. Modified the way modules/packages are passed to the Ant task (CVSSCM:789)
(I'll be revisiting this).
Everything up to now has simply been to get Hudson to work with the new Ant
task. This caused some information to appear in the change log, when builds are
triggered based on tags. However, because there are no historical information
associated with tags, the change log only shows the revision of the file that
was tagged (even when there may be multiple revisions to the file since the
last build). To resolve this, I've modified the "task.setTag(String)" line as
follows:
task.setTag(isTag() ? ":" + branch : branch);
(Passing ":rev" to CVS tells it to generate change log for the revision
tagged "rev" and before, on the same branch, per CVSNT's "cvs log --help").
There are still a few outstanding issues:
1. Since tags are not versioned, it is possible for a file to be committed
before the previous build, but tagged after the build. This will cause a new
build to be triggered. However, the change log will not include information
about this file, since as far as CVS is concerned, the change occurred before
the last build.
2. Tags can be moved backwards to an older revision, or across branches, which
will probably cause some problems.
I'll continue to work on these issues.
Just did some research (I'm sure you already know these details, but for
completeness); It appears that the ant task "ChangeLog" won't take tags as
parameters, but the CVSTagDiff task will. But CVSTagDiff doesn't appear to
include check-in comments in it's xml output.
So, I suppose this is an enhancement if you were to add "CVSTagDiff" for builds
that were based on tags.
Minimally (if running CVSTagDIff doesn't work for some reason), Hudson shouldn't
falsely display "no changes" if a build was based on a tag.