Maven Changelog Plugin
  1. Maven Changelog Plugin
  2. MCHANGELOG-3

Links in File Activity Report can be wrong when using subversion, after a copy command has been issued

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Labels:
      None
    • Environment:
      OSX 10.4.3, java 1.4.2_09
    • Number of attachments :
      5

      Description

      When you do a subversion copy command, the list of files produced by svn log often have additional information that is part of the filename:

      R /tags/prt-1.3/prt-admin/pom.xml (from /trunk/prt-admin/pom.xml:128)

      In SvnChangeLogParser.java, the file name is parsed as /tags/prt-1.3/prt-admin/pom.xml (from /trunk/prt-admin/pom.xml:128) when of course it should be /tags/prt-1.3/prt-admin/pom.xml. This is most significantly manifested when a link is generated, such as in the File Activity Report.

      http://...?repname=prt&sc=0&path=/tags/prt-1.3/pom.xml%20(from%20/trunk/pom.xml:128)

      I can see two approaches to the problem. The simplest is to add a regular expression which deletes the extraneous data, but then you lose that potentially valuable information. Maybe ChangeLogFile should keep track of a file (path) and a name, rather than just a name, so that the link can be made properly.

      1. changelog.xml
        2 kB
        Julian Wood
      2. MCHANGELOG-3.patch
        5 kB
        Julian Wood
      3. MOJO-216-changelog-maven-plugin.patch
        0.9 kB
        Julian Wood
      4. MOJO-216-changelog-maven-plugin-1a.patch
        4 kB
        Julian Wood
      5. svnlog2.txt
        6 kB
        Julian Wood

        Activity

        Hide
        Julian Wood added a comment -

        This patch removes extraneous information from svn file list entries.

        Show
        Julian Wood added a comment - This patch removes extraneous information from svn file list entries.
        Hide
        Julian Wood added a comment -

        This adds tests (testParse2()) for the removal of extraneous svn information. You need the attached test-resources for it to work.

        Note there is a second test (testXmlParse()) as well, which I haven't separated. It tests for proper time formatting, which was issue MOJO-153. It too needs a test-resource file. I hope it's OK to include it here.

        Show
        Julian Wood added a comment - This adds tests (testParse2()) for the removal of extraneous svn information. You need the attached test-resources for it to work. Note there is a second test (testXmlParse()) as well, which I haven't separated. It tests for proper time formatting, which was issue MOJO-153 . It too needs a test-resource file. I hope it's OK to include it here.
        Hide
        Julian Wood added a comment -

        Belongs in src/test-resources/svn-lib and is required for the unit tests to work.

        Show
        Julian Wood added a comment - Belongs in src/test-resources/svn-lib and is required for the unit tests to work.
        Hide
        Julian Wood added a comment -

        Belongs in src/test-resources/svnlib and is required for the attached unit test.

        Show
        Julian Wood added a comment - Belongs in src/test-resources/svnlib and is required for the attached unit test.
        Hide
        Edwin Punzalan added a comment -

        Julian.

        The changelog has been migrated to use maven-scm. Can you check if this issue has been fixed?

        Show
        Edwin Punzalan added a comment - Julian. The changelog has been migrated to use maven-scm. Can you check if this issue has been fixed?
        Hide
        Julian Wood added a comment -

        I'm finding several bugs related to linking and to the new displayFileDetailURL variable. I'll get back to you when I have it sorted out.

        I've also added some unit tests, for which there are currently none. I really think we should add these unit tests in. I'll post a new bug report, again when I have this sorted out.

        Thanks,

        J

        Show
        Julian Wood added a comment - I'm finding several bugs related to linking and to the new displayFileDetailURL variable. I'll get back to you when I have it sorted out. I've also added some unit tests, for which there are currently none. I really think we should add these unit tests in. I'll post a new bug report, again when I have this sorted out. Thanks, J
        Hide
        Brett Porter added a comment -

        Julian - any update?

        Show
        Brett Porter added a comment - Julian - any update?
        Hide
        Julian Wood added a comment -

        Sorry guys - I've been swamped. I'll get to it tomorrow.

        Show
        Julian Wood added a comment - Sorry guys - I've been swamped. I'll get to it tomorrow.
        Hide
        Julian Wood added a comment -

        Umm, where did changelog go? It used to be at mojo:

        https://svn.mojo.codehaus.org/mojo/trunk/mojo/changes-maven-plugin

        I can see Brett deleted it the other day at revision 1710. In rev 1711 a changelog-maven-plugin folder was added to the /trunk/mojo/mojo-site/src/site/resources directory, but it is empty with the exception of .htacesss, and is likely just for docs anyway.

        Has it also been migrated into (as well as changed to use) maven-scm? I don't see it here either:

        http://svn.apache.org/viewcvs.cgi/maven/plugins/trunk/

        or here

        http://svn.apache.org/viewcvs.cgi/maven/scm/trunk

        Whither has it gone? I guess I'm missing something.

        Thanks,

        J

        Show
        Julian Wood added a comment - Umm, where did changelog go? It used to be at mojo: https://svn.mojo.codehaus.org/mojo/trunk/mojo/changes-maven-plugin I can see Brett deleted it the other day at revision 1710. In rev 1711 a changelog-maven-plugin folder was added to the /trunk/mojo/mojo-site/src/site/resources directory, but it is empty with the exception of .htacesss, and is likely just for docs anyway. Has it also been migrated into (as well as changed to use) maven-scm? I don't see it here either: http://svn.apache.org/viewcvs.cgi/maven/plugins/trunk/ or here http://svn.apache.org/viewcvs.cgi/maven/scm/trunk Whither has it gone? I guess I'm missing something. Thanks, J
        Show
        Julian Wood added a comment - Found it. http://svn.apache.org/viewcvs.cgi/maven/sandbox/plugins/ J
        Hide
        Edwin Punzalan added a comment -

        Julian, how's this issue?

        Show
        Edwin Punzalan added a comment - Julian, how's this issue?
        Hide
        Julian Wood added a comment -

        Still there AFAIK. Check out:

        http://commons.ucalgary.ca/projects/lc-webapp-archetype/changelog.html

        and look at some of the links like:

        /trunk/pom.xml (from /pom.xml:8)

        Let me check if the patch still works.

        J

        Show
        Julian Wood added a comment - Still there AFAIK. Check out: http://commons.ucalgary.ca/projects/lc-webapp-archetype/changelog.html and look at some of the links like: /trunk/pom.xml (from /pom.xml:8) Let me check if the patch still works. J
        Hide
        Julian Wood added a comment -

        Okay obviously those files and patches don't work any more - I can't delete them though. Here's a new patch, MCHANGELOG-3.patch, which fixes the problem. It does 3 things:

        1. Change line-endings to \n from \r\n in min-changelog.xml so that patch command can work.
        2. Add the problematic file/name text content to one of the file/name elements.
        3. Fix the problem in ChangeLogHandler.java by using a regex to filter out the problematic name.

        Note that there is a potential conflict with MCHANGELOG-36a.patch, since they both alter ChangeLogHandler.java. If this patch is applied first, it will be okay.

        Show
        Julian Wood added a comment - Okay obviously those files and patches don't work any more - I can't delete them though. Here's a new patch, MCHANGELOG-3 .patch, which fixes the problem. It does 3 things: 1. Change line-endings to \n from \r\n in min-changelog.xml so that patch command can work. 2. Add the problematic file/name text content to one of the file/name elements. 3. Fix the problem in ChangeLogHandler.java by using a regex to filter out the problematic name. Note that there is a potential conflict with MCHANGELOG-36 a.patch, since they both alter ChangeLogHandler.java. If this patch is applied first, it will be okay.
        Hide
        Edwin Punzalan added a comment -

        Patch applied, thanks.

        Show
        Edwin Punzalan added a comment - Patch applied, thanks.

          People

          • Assignee:
            Edwin Punzalan
            Reporter:
            Julian Wood
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: