Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29985

CVS RepositoryBrowser setting seems to be ignored

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: cvs-plugin
    • Labels:
      None
    • Environment:
      Jenkins v. 1.624,
      cvs-plugin v. 2.13,
      SUSE Linux Enterprise Server 11 SP2 (x86_64),
      Apache Tomcat Version 7.0.54,
      Java 1.7.0_45, 64-Bit Server VM (build 24.45-b08, mixed mode
      deployed as war-file.
    • Similar Issues:

      Description

      Hello,

      whenever I select "OpenGrok" as CVS Repository Browser, it doesn't seem to be used. There are no diff- and file-links to OpenGrok in the Changes-Page as expected.

      The browser is configured in a job's scm section, the config.xml reflects this perfectly.

      <repositories>
      <hudson.scm.CvsRepository>
      [...]
      <repositoryBrowser class="hudson.scm.browsers.OpenGrok">
      <url>http:/192.168.100.12:59990/source/xref/project/</url>
      </repositoryBrowser>
      [...]

      The RepositoryBrowser is used in "cvs-plugin/src/main/resources/hudson/scm/CVSChangeLogSet/index.jelly"

      The RepositoryBrowser is usually referenced in "CVSSCM.java", where "getEffectiveBrowser()" (inherited from "SCM.java") should return the result of "getBrowser()", which should return the current CvsFacadeRepositoryBrowser, which is created in "readResolve()", if the variable repositoryBrowser is not null.

      But: The variable "repositoryBrowser" in "CVSSCM.java" does not seem to be set ever, except for some deprecated constructors. I can not see, which constructor was used, but there are constructors, that don't set the Member field "repositoryBrowser", but the member field "repositories". In this case, the Method "readResolve()" would return whithout initializing the variable "facadeRepositoryBrowser". If the "facadeRepositoryBrowser" is not initialized, "getBrowser()" returns an CvsFacadeRepositoryBrowser with Member field "legacyBrowser" set to null.

      This seems to activate a mode, where the RepositoryBrowser is looked up via the "CvsFacadeRepositoryBrowser".In "calculateRepositoryBrowser(CVSChangeLogSet.CVSChangeLog changelog)" it is referenced as "changelog.getRepository().getRepositoryBrowser()".

      The CVSChangeLog is created with information from the omnipresent "final CvsRepository[] repositories". I have tried to analyze all the places, where "CvsRepository" is instantiated, as i assume, the RepositoryBrowser-information might get lost somewhere in between.

      the changes-page is described in: "jenkins/core/src/main/resources/hudson/scm/SCM/project-changes.jelly". In this file, "browser.getChangeSetLink" is called, which returns "null" if OpenGrok is selected. there is a comment:

      <!-- This anchor is meaningless if there is >1 ChangeLogSet/index.jelly for the build; an SCM should rather use an actual commit ID for the anchor: -->

      I do not really understand the part "This anchor is meaningless if there is >1 ChangeLogSet/index.jelly for the build". The only file, where OpenGrok would be asked for a valid link would be "cvs-plugin/src/main/resources/hudson/scm/CVSChangeLogSet/index.jelly".

      please note, that "CVSChangeLogSet" is not "ChangeLogSet" as mentioned above. CVSChangeLogSet\index.jelly resolves the browser like this:

      <j:set var="browser" value="${it.build.parent.scm.effectiveBrowser}"/>

        Attachments

          Activity

          Hide
          io39d io39d added a comment -

          Same problem, regardless of the setting (tried ViewVC and OpenGrok) no diff links are generated for cvs changes.

          Show
          io39d io39d added a comment - Same problem, regardless of the setting (tried ViewVC and OpenGrok) no diff links are generated for cvs changes.

            People

            • Assignee:
              Unassigned
              Reporter:
              esteban Stefan Diercks
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: