jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1.x Changelog Plugin
  • MPCHANGELOG-36

changelog.xml author tag in Clearcase contains developer.id

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.4
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    Clearcase, Windows XP

Description

With exactly the same project.xml I see this type of thing in the changelog.xml generated using the CVS changelog factory:

<changelog-entry>
<date>2004-04-14</date>
<time>11:05:28</time>
<author><![CDATA[Matt Read]]></author>

However with Clearcase factory I get this:

<changelog-entry>
<date>2004-04-15</date>
<time>10:28:28</time>
<author><![CDATA[readm ]]></author>

I.e. it's using the developer.id from project.xml instead of the developer.name. It's also padding with whitespace which might also be causing problems.

Symptoms of this are that although the changelog report and file activity reports are correct, the Developer Activity report is blank as it's unable to match author to name.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Java Source File
    ClearcaseChangeLogParserTest.java
    30/Jun/04 11:58 AM
    3 kB
    Matt Read
  2. Text File
    clearcaselog.txt
    30/Jun/04 12:00 PM
    0.7 kB
    Matt Read
  3. Text File
    username_patch.txt
    30/Jun/04 12:01 PM
    0.8 kB
    Matt Read

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Matt Read added a comment - 26/Apr/04 10:17 AM

Adding a .trim() to the setAuthor() method when parsing the output of the "cleartool lshistory" command in ClearcaseChangeLogParser.java fixes the majority of problems, EXCEPT when the Clearcase user id is longer than 8 characters. I'll work on a more complete patch when I have more than 5 mins.

Index: ClearcaseChangeLogParser.java
===================================================================
RCS file: /home/cvspublic/maven-plugins/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogParser.java,v
retrieving revision 1.3
diff -u -r1.3 ClearcaseChangeLogParser.java
— ClearcaseChangeLogParser.java 2 Mar 2004 15:00:18 -0000 1.3
+++ ClearcaseChangeLogParser.java 26 Apr 2004 14:15:03 -0000
@@ -250,7 +250,7 @@
}
else if (line.startsWith(USER_TAG))
{

  • getCurrentLogEntry().setAuthor(line.substring(USER_TAG.length()));
    + getCurrentLogEntry().setAuthor(line.substring(USER_TAG.length()).trim());
    // add entry, and set state to get file
    addEntry(getCurrentLogEntry(), getCurrentFile());
    setStatus(GET_FILE);
Show
Matt Read added a comment - 26/Apr/04 10:17 AM Adding a .trim() to the setAuthor() method when parsing the output of the "cleartool lshistory" command in ClearcaseChangeLogParser.java fixes the majority of problems, EXCEPT when the Clearcase user id is longer than 8 characters. I'll work on a more complete patch when I have more than 5 mins. Index: ClearcaseChangeLogParser.java =================================================================== RCS file: /home/cvspublic/maven-plugins/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogParser.java,v retrieving revision 1.3 diff -u -r1.3 ClearcaseChangeLogParser.java — ClearcaseChangeLogParser.java 2 Mar 2004 15:00:18 -0000 1.3 +++ ClearcaseChangeLogParser.java 26 Apr 2004 14:15:03 -0000 @@ -250,7 +250,7 @@ } else if (line.startsWith(USER_TAG)) {
  • getCurrentLogEntry().setAuthor(line.substring(USER_TAG.length())); + getCurrentLogEntry().setAuthor(line.substring(USER_TAG.length()).trim()); // add entry, and set state to get file addEntry(getCurrentLogEntry(), getCurrentFile()); setStatus(GET_FILE);
Hide
Permalink
Brett Porter added a comment - 07/May/04 6:34 PM

ok, we'll wait for the extended patch. Please attach to the issue instead of posting inline.

Show
Brett Porter added a comment - 07/May/04 6:34 PM ok, we'll wait for the extended patch. Please attach to the issue instead of posting inline.
Hide
Permalink
Matt Read added a comment - 30/Jun/04 11:58 AM

I've attached a new test that recreates the problem. Let me know if you'd prefer this as a patch from the root of the project.

Show
Matt Read added a comment - 30/Jun/04 11:58 AM I've attached a new test that recreates the problem. Let me know if you'd prefer this as a patch from the root of the project.
Hide
Permalink
Matt Read added a comment - 30/Jun/04 12:00 PM

And the example Clearcase output log required for the test to execute.

Show
Matt Read added a comment - 30/Jun/04 12:00 PM And the example Clearcase output log required for the test to execute.
Hide
Permalink
Matt Read added a comment - 30/Jun/04 12:01 PM

And the patch which makes the test pass.

Show
Matt Read added a comment - 30/Jun/04 12:01 PM And the patch which makes the test pass.
Hide
Permalink
Matt Read added a comment - 30/Jun/04 12:08 PM

These files will both test and fix the issue that I originally reported however there is still a problem if the developer.id in project.xml is longer than 8 characters.

I'm not sure how to write a test for this as it depends on the plugin.jelly executing and I'm not familiar enough with Maven to know how to do that.

I'm also unsure what the fix would look like as code is not product specific (ChangeLog.replaceAuthorIdWithName()).

Let me know if I can help, otherwise I'd suggest including a note in the documentation for Clearcase users.

Matt.

Show
Matt Read added a comment - 30/Jun/04 12:08 PM These files will both test and fix the issue that I originally reported however there is still a problem if the developer.id in project.xml is longer than 8 characters. I'm not sure how to write a test for this as it depends on the plugin.jelly executing and I'm not familiar enough with Maven to know how to do that. I'm also unsure what the fix would look like as code is not product specific (ChangeLog.replaceAuthorIdWithName()). Let me know if I can help, otherwise I'd suggest including a note in the documentation for Clearcase users. Matt.
Hide
Permalink
dion gillard added a comment - 09/Jul/04 8:37 AM

Applied

Show
dion gillard added a comment - 09/Jul/04 8:37 AM Applied

People

  • Assignee:
    Unassigned
    Reporter:
    Matt Read
Vote (0)
Watch (1)

Dates

  • Created:
    15/Apr/04 9:47 AM
    Updated:
    09/Jul/04 8:37 AM
    Resolved:
    09/Jul/04 8:37 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.