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 2.x Changelog Plugin
  • MCHANGELOG-16

when using svn, links are wrong

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.0
  • Labels:
    None
  • Environment:
    osx 10.4.5, java 1.4.2_09
  • Testcase included:
    yes

Description

Here's my setup:

<scm>
<connection>scm:svn:http://apollo.ucalgary.ca:8800/pmgt/trunk</connection>
<developerConnection>scm:svn:http://apollo.ucalgary.ca:8800/pmgt/trunk</developerConnection>
<url>http://apollo.ucalgary.ca/websvncommons/listing.php?repname=pmgt&amp;rev=0&amp;sc=0&amp;path=/trunk</url>
</scm>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changelog-plugin</artifactId>
<version>2.0-beta-2-SNAPSHOT</version>
<reportSets>
<reportSet>
<id>changes</id>
<configuration>
<displayFileDetailUrl>http://apollo.ucalgary.ca/websvncommons/filedetails.php?repname=pmgt&amp;rev=0&amp;sc=0&amp;path=</displayFileDetailUrl>
<type>range</type>
<range>90</range>
</configuration>
<reports>
<report>changelog</report>
<report>file-activity</report>
<report>dev-activity</report>
</reports>
</reportSet>
</reportSets>
</plugin>

With that displayFileDetailUrl, I get links like this in the resultant changelog in my site:

http://apollo.ucalgary.ca/websvncommons/filedetails.php/trunk/pmgt-webapp/src/main/webapp/links/create_groups.jsp?repname=pmgt&sc=0&path=

but it should be like this:

link = http://apollo.ucalgary.ca/websvncommons/filedetails.php?repname=pmgt&sc=0&rev=0&path=/trunk/pmgt-webapp/src/main/webapp/links/create_groups.jsp

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

Attachments

  1. Text File
    MCHANGELOG-16.patch
    27/Mar/06 10:45 PM
    3 kB
    Julian Wood
  2. Hide
    Zip Archive
    test.zip
    27/Mar/06 10:48 PM
    3 kB
    Julian Wood
    1. Java Source File
      test/java/.../changelog/ChangeLogTest.java 3 kB
    2. Java Source File
      test/java/.../changelog/PrintStreamSink.java 0.8 kB
    Download Zip
    Show
    Zip Archive
    test.zip
    27/Mar/06 10:48 PM
    3 kB
    Julian Wood

Issue Links

relates to

New Feature - A new feature of the product, which has yet to be developed. MCHANGELOG-5 Generated links to files in scm are based on the scm url tag in the pom (but should they be??)

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Julian Wood added a comment - 27/Mar/06 10:45 PM

This patch does 4 things:

1. Makes a few vars protected rather than private so that we can assign initial values to them, so that we can unit test. Is there another way to replicate the maven environment?
2. Contains the patch from MCHANGELOG-15, which fixes the index out of bounds error.
3. Adds specific treatment for svn urls in generateLinks()
4. Fixes another bug where only the first changeset has a proper link. This is caused by calling initReportUrls() for every changeset (which then makes rpt_OneRepoParam into an empty string on the second pass), and is fixed by doing it once per table.

Show
Julian Wood added a comment - 27/Mar/06 10:45 PM This patch does 4 things: 1. Makes a few vars protected rather than private so that we can assign initial values to them, so that we can unit test. Is there another way to replicate the maven environment? 2. Contains the patch from MCHANGELOG-15, which fixes the index out of bounds error. 3. Adds specific treatment for svn urls in generateLinks() 4. Fixes another bug where only the first changeset has a proper link. This is caused by calling initReportUrls() for every changeset (which then makes rpt_OneRepoParam into an empty string on the second pass), and is fixed by doing it once per table.
Hide
Permalink
Julian Wood added a comment - 27/Mar/06 10:48 PM

These are unit tests, for urls generated by ChangelogReport in the case of svn as your scm. They belong in the src directory. They will work with the unpatched ChangeLogReport.java, iff you make scmUrl and displayFileDetailUrl protected rather than private.

Show
Julian Wood added a comment - 27/Mar/06 10:48 PM These are unit tests, for urls generated by ChangelogReport in the case of svn as your scm. They belong in the src directory. They will work with the unpatched ChangeLogReport.java, iff you make scmUrl and displayFileDetailUrl protected rather than private.
Hide
Permalink
Edwin Punzalan added a comment - 11/Apr/06 6:06 AM

Patch applied. Thanks.

Show
Edwin Punzalan added a comment - 11/Apr/06 6:06 AM Patch applied. Thanks.
Hide
Permalink
Dennis Lundberg added a comment - 26/Aug/06 8:23 AM

I have reverted the patch for this issue because it breaks the link creation for other svn web presentation systems, most notably viewcvs and viewvc.

Show
Dennis Lundberg added a comment - 26/Aug/06 8:23 AM I have reverted the patch for this issue because it breaks the link creation for other svn web presentation systems, most notably viewcvs and viewvc.
Hide
Permalink
Dennis Lundberg added a comment - 14/Oct/06 11:23 AM

Closing as "Won't Fix" beacuse the web presentation system for SCM used in this example seems to be extremely rare. Google turned up 123 hits for "websvncommons" most of which comes from our JIRA or mailing lists.

Show
Dennis Lundberg added a comment - 14/Oct/06 11:23 AM Closing as "Won't Fix" beacuse the web presentation system for SCM used in this example seems to be extremely rare. Google turned up 123 hits for "websvncommons" most of which comes from our JIRA or mailing lists.
Hide
Permalink
Julian Wood added a comment - 14/Oct/06 12:30 PM

Dennis, I think you are missing a lot of information. I haven't had time to look in detail, but let me fill you in from what I know, and what I suspect.

1. The decision to close - websvncommons? That is just our URL. Not the name of the presentation system, which is websvn (http://websvn.tigris.org/) Try looking that up in google As far as I know, not just svn, but every web presentation system has a different url for to show the listing of a directory vs the detailed changes or the printout of a file, which was the point of this change. I don't know how you can justify forcing a single URL on developers to cover all potential cases.

2. I suspect that your conclusion that it breaks other systems is wrong. We basically add one 'if' clause to a number of others, to account for this case in particular. The other cases were untouched. That in itself should give you confidence in the patch. We tested it with other systems and it was fine with everyone for over 6 months. So I think there was some other coincidental problem that you encountered. And if there was a problem, how could it be anything more than a trivial fix? Why was the problem never described, at all? I'm sure your new problem would be easy to fix.

So, I'm going to reopen the issue, because I think it's incredibly valuable to be able to click on the link in the changelog, and actually see the file you clicked on (which does not work without such a patch).

Show
Julian Wood added a comment - 14/Oct/06 12:30 PM Dennis, I think you are missing a lot of information. I haven't had time to look in detail, but let me fill you in from what I know, and what I suspect. 1. The decision to close - websvncommons? That is just our URL. Not the name of the presentation system, which is websvn (http://websvn.tigris.org/) Try looking that up in google As far as I know, not just svn, but every web presentation system has a different url for to show the listing of a directory vs the detailed changes or the printout of a file, which was the point of this change. I don't know how you can justify forcing a single URL on developers to cover all potential cases. 2. I suspect that your conclusion that it breaks other systems is wrong. We basically add one 'if' clause to a number of others, to account for this case in particular. The other cases were untouched. That in itself should give you confidence in the patch. We tested it with other systems and it was fine with everyone for over 6 months. So I think there was some other coincidental problem that you encountered. And if there was a problem, how could it be anything more than a trivial fix? Why was the problem never described, at all? I'm sure your new problem would be easy to fix. So, I'm going to reopen the issue, because I think it's incredibly valuable to be able to click on the link in the changelog, and actually see the file you clicked on (which does not work without such a patch).
Hide
Permalink
Julian Wood added a comment - 14/Oct/06 12:31 PM

The issue is still at large. You should be able to click on a link in your changelog and have it show the file in your web presentation system. Currently, this does not work.

Show
Julian Wood added a comment - 14/Oct/06 12:31 PM The issue is still at large. You should be able to click on a link in your changelog and have it show the file in your web presentation system. Currently, this does not work.
Hide
Permalink
Dennis Lundberg added a comment - 14/Oct/06 1:35 PM

Hi Julian

Glad your're still with us.

1. Well then, now we have something more to go on. I agree that such a presentation system is worth supporting. That was not apparent in the original report though.

Ideally I would like to do something similar to the changes plugin where you can configure a pattern for displayFileDetailUrl with special markers for "file" and "revision" so that you could use:
<displayFileDetailUrl>http://apollo.ucalgary.ca/websvncommons/filedetails.php?repname=pmgt&amp;rev=%REVISION%&amp;sc=0&amp;path=%FILE%</displayFileDetailUrl>

But that I think that requires a lot of plumbing to be replaced. So I would like to wait with such a feature until the next version (2.1) of the plugin.

2. The "if cluse" that is added by the patch hijacks all SVN SCM connections resulting in, at least the ones using viewvc not working properly. For the time being the "if clause" solution is the way to go, until something similar to 1. is implemented, but it has to be transparent to other systems. Is there a distinct signature in URLs for websvn that we can use to check against?

Show
Dennis Lundberg added a comment - 14/Oct/06 1:35 PM Hi Julian Glad your're still with us. 1. Well then, now we have something more to go on. I agree that such a presentation system is worth supporting. That was not apparent in the original report though. Ideally I would like to do something similar to the changes plugin where you can configure a pattern for displayFileDetailUrl with special markers for "file" and "revision" so that you could use: <displayFileDetailUrl>http://apollo.ucalgary.ca/websvncommons/filedetails.php?repname=pmgt&amp;rev=%REVISION%&amp;sc=0&amp;path=%FILE%</displayFileDetailUrl> But that I think that requires a lot of plumbing to be replaced. So I would like to wait with such a feature until the next version (2.1) of the plugin. 2. The "if cluse" that is added by the patch hijacks all SVN SCM connections resulting in, at least the ones using viewvc not working properly. For the time being the "if clause" solution is the way to go, until something similar to 1. is implemented, but it has to be transparent to other systems. Is there a distinct signature in URLs for websvn that we can use to check against?
Hide
Permalink
Julian Wood added a comment - 14/Oct/06 10:37 PM

I've linked to the original report. As I remember, we patched, then Maven changed somewhat substantially, which broke this patch, and so we patched again. That's what this report is (was) about. I think you're looking for the original report.

As for distinct signatures, I don't really think there is one, but I also don't think that's necessary. The developer should simply be able to choose what URL they would like to use in order to present files out of their chosen scm. There's no reason why it should break any system at all.

I think the original patch was designed to simply see if the displayFileDetailURL had been set, and only do something if it had. If it wasn't doing that, then there is a bug in the patch, which should be trivial to fix. That is a possible way forward.

BTW your suggestion about the parallel with changes is exactly right.

Thanks,

J

Show
Julian Wood added a comment - 14/Oct/06 10:37 PM I've linked to the original report. As I remember, we patched, then Maven changed somewhat substantially, which broke this patch, and so we patched again. That's what this report is (was) about. I think you're looking for the original report. As for distinct signatures, I don't really think there is one, but I also don't think that's necessary. The developer should simply be able to choose what URL they would like to use in order to present files out of their chosen scm. There's no reason why it should break any system at all. I think the original patch was designed to simply see if the displayFileDetailURL had been set, and only do something if it had. If it wasn't doing that, then there is a bug in the patch, which should be trivial to fix. That is a possible way forward. BTW your suggestion about the parallel with changes is exactly right. Thanks, J
Hide
Permalink
Dennis Lundberg added a comment - 15/Oct/06 2:02 AM

Thanks Julian

This was really helpful. Now I can see the intentions of the original patch. Unfortunately it was not implemented like you wanted it to [1] and that's the reason why it broke other systems. I will try to change the current behavior to the one you intended.

[1] http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java?r1=393154&r2=393180

Show
Dennis Lundberg added a comment - 15/Oct/06 2:02 AM Thanks Julian This was really helpful. Now I can see the intentions of the original patch. Unfortunately it was not implemented like you wanted it to [1] and that's the reason why it broke other systems. I will try to change the current behavior to the one you intended. [1] http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java?r1=393154&r2=393180
Hide
Permalink
Dennis Lundberg added a comment - 15/Oct/06 3:26 AM

I have tried different solutions to this and think that I have something that might work. I just need to verify it on a real project. The repo that you mentioned in your original report is no longer available, but I found another one at your site that I'd like to use to test this, if that's OK with you: http://apollo.ucalgary.ca:8800/lc-webapp-archetype/

Unfortunately it requires login and password to view the files. Do you have the possibility to give me access to view the files? You can send me the details to my apache address if you like. Or, perhaps you have another repo that can be used for testing, that doesn't require login.

Show
Dennis Lundberg added a comment - 15/Oct/06 3:26 AM I have tried different solutions to this and think that I have something that might work. I just need to verify it on a real project. The repo that you mentioned in your original report is no longer available, but I found another one at your site that I'd like to use to test this, if that's OK with you: http://apollo.ucalgary.ca:8800/lc-webapp-archetype/ Unfortunately it requires login and password to view the files. Do you have the possibility to give me access to view the files? You can send me the details to my apache address if you like. Or, perhaps you have another repo that can be used for testing, that doesn't require login.
Hide
Permalink
Dennis Lundberg added a comment - 28/Oct/06 7:06 PM

The patch I created for this has been applied and a new SNAPSHOT version of the plugin has been published. Please try it and see if it solves your problem.

Show
Dennis Lundberg added a comment - 28/Oct/06 7:06 PM The patch I created for this has been applied and a new SNAPSHOT version of the plugin has been published. Please try it and see if it solves your problem.
Hide
Permalink
Julian Wood added a comment - 29/Oct/06 6:29 PM

Sorry I have been unavailable again for a while. I'll try and make some time to try out the patch this week. Thanks.

Show
Julian Wood added a comment - 29/Oct/06 6:29 PM Sorry I have been unavailable again for a while. I'll try and make some time to try out the patch this week. Thanks.
Hide
Permalink
Dennis Lundberg added a comment - 22/Nov/06 4:13 PM

Julian, do you think you could try out the latest SNAPSHOT?

I'd like to release maven-changelog-plugin, and this is the last remaining issue scheduled for 2.0.

Show
Dennis Lundberg added a comment - 22/Nov/06 4:13 PM Julian, do you think you could try out the latest SNAPSHOT? I'd like to release maven-changelog-plugin, and this is the last remaining issue scheduled for 2.0.
Hide
Permalink
Julian Wood added a comment - 22/Nov/06 4:45 PM

Works well for me. Thanks.

J

Show
Julian Wood added a comment - 22/Nov/06 4:45 PM Works well for me. Thanks. J

People

  • Assignee:
    Dennis Lundberg
    Reporter:
    Julian Wood
Vote (1)
Watch (1)

Dates

  • Created:
    27/Mar/06 10:38 PM
    Updated:
    23/Nov/06 2:53 PM
    Resolved:
    23/Nov/06 2:53 PM
  • 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.