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

Add websvn as a repository browser choice for svn

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • subversion-plugin
    • None
    • Platform: All, OS: All

      I think it would be really nice/cool to be able to click on a particular change
      in the changes list and see a diff for that change....maybe something similiar
      to what svnspam produces.

      If I have time, I will look into doing this but I wanted to at least get it tracked.

          [JENKINS-617] Add websvn as a repository browser choice for svn

          Jesse Glick added a comment -

          You can run FishEye or ViewSVN. See for example

          http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/changes

          Jesse Glick added a comment - You can run FishEye or ViewSVN. See for example http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/changes

          Jason Chaffee added a comment -

          This is exactly what I was wanting. However, it would be nice if it supported
          websvn as well.

          Jason Chaffee added a comment - This is exactly what I was wanting. However, it would be nice if it supported websvn as well.

          Jason Chaffee added a comment -

          I changed the summary based on the new info.

          See http://websvn.tigris.org/

          Jason Chaffee added a comment - I changed the summary based on the new info. See http://websvn.tigris.org/

          Any chance you could help us writing a plugin?

          Essentially all you need to do is to implement RepositoryBrowser
          (https://hudson.dev.java.net/nonav/javadoc/index.html?hudson/scm/RepositoryBrowser.html)
          and if you know how the URL of websvn looks like, you should be able to
          implement it fairly quickly. You can also look at other implementations that we
          already have to get some idea.

          I'll be more than happy to help you with packaging that up to a plugin.

          Kohsuke Kawaguchi added a comment - Any chance you could help us writing a plugin? Essentially all you need to do is to implement RepositoryBrowser ( https://hudson.dev.java.net/nonav/javadoc/index.html?hudson/scm/RepositoryBrowser.html ) and if you know how the URL of websvn looks like, you should be able to implement it fairly quickly. You can also look at other implementations that we already have to get some idea. I'll be more than happy to help you with packaging that up to a plugin.

          Jason Chaffee added a comment -

          Sure. I will try to get to it in the next week or so.

          Jason Chaffee added a comment - Sure. I will try to get to it in the next week or so.

          Jason Chaffee added a comment -

          Created an attachment (id=85)
          Attached implementation class for this issue

          Jason Chaffee added a comment - Created an attachment (id=85) Attached implementation class for this issue

          My apologies for the delay. Integrated in 1.139.
          I'd like to add some help text about what the expected URL is. Can you put some
          text here? (I'd be happy to integrate that into Hudson.)

          Also, I looked at https://wush.net/websvn/trustin/ as a live example, but I
          noticed that URL format seems to be very different from your code would
          produce. What version of WebSVN do you use?

          Kohsuke Kawaguchi added a comment - My apologies for the delay. Integrated in 1.139. I'd like to add some help text about what the expected URL is. Can you put some text here? (I'd be happy to integrate that into Hudson.) Also, I looked at https://wush.net/websvn/trustin/ as a live example, but I noticed that URL format seems to be very different from your code would produce. What version of WebSVN do you use?

          Jason Chaffee added a comment -

          The expectation is that websvn is configured for multiviews. I have attached
          the install text from websvn that discusses multiviews:

          MULTIVIEWS

          You may choose to configure access to your repository via Apache's MultiView
          system. This will enable you to access a respositoy using a url such as:

          http://servername/wsvn/repname/path/in/repository

          To do this you must:

          • Place wsvn.php where you want to. Normally you place it such that it's
            accessible straight after the servername, as shown above.
          • Configure the parent directory of wsvn.php to use MultiViews (see Apache
            docs).
          • Change config.inc to include the line $config->useMultiViews();
          • Change the paths configured at the beginning of the wsvn.php script.

          Now go to http://servername/wsvn/ and make sure that you get the index page.

          The repname part of the URL is the name given to it in the config.inc file.
          For this reason you may wish to avoid putting spaces in the name.

          MULTIVIEWS EXAMPLE

          First, you must get the Multiviews option working. In my set up, my Apache
          directory root is set to a location on my harddrive:

          DocumentRoot "D:/svnpage"

          In that directory, I have WebSVN installed in a directory called websvn.
          Normally WebSVN would be accessed by http://servername/websvn

          wsvn.php in then copied from the WebSVN installation to the document root
          directory and the variables at the beginning of the script configured as
          follows (based on your own directory locations, obviously):

          // Location of websvn directory via HTTP
          //
          // e.g. For http://servername/websvn use /websvn
          //
          // Note that wsvn.php need not be in the /websvn directory (and normally isn't).
          $locwebsvnhttp = "/websvn";

          // Physical location of websvn directory
          $locwebsvnreal = "d:/svnpage/websvn";

          Next, turn on Multiviews in the WebSVN config.inc file:

          $config->useMultiViews();

          Finally, Apache needs to know that you want to enable MultiViews for the root
          directory. This can be done by including this line in the directory's
          .htaccess file (assuming that the appropriate AllowOverrides directive is set
          up):

          Options MultiViews

          If all has gone well, repositories should now by accessible by
          http://servername/wsvn/repname

          Jason Chaffee added a comment - The expectation is that websvn is configured for multiviews. I have attached the install text from websvn that discusses multiviews: MULTIVIEWS You may choose to configure access to your repository via Apache's MultiView system. This will enable you to access a respositoy using a url such as: http://servername/wsvn/repname/path/in/repository To do this you must: Place wsvn.php where you want to. Normally you place it such that it's accessible straight after the servername, as shown above. Configure the parent directory of wsvn.php to use MultiViews (see Apache docs). Change config.inc to include the line $config->useMultiViews(); Change the paths configured at the beginning of the wsvn.php script. Now go to http://servername/wsvn/ and make sure that you get the index page. The repname part of the URL is the name given to it in the config.inc file. For this reason you may wish to avoid putting spaces in the name. MULTIVIEWS EXAMPLE First, you must get the Multiviews option working. In my set up, my Apache directory root is set to a location on my harddrive: DocumentRoot "D:/svnpage" In that directory, I have WebSVN installed in a directory called websvn. Normally WebSVN would be accessed by http://servername/websvn wsvn.php in then copied from the WebSVN installation to the document root directory and the variables at the beginning of the script configured as follows (based on your own directory locations, obviously): // Location of websvn directory via HTTP // // e.g. For http://servername/websvn use /websvn // // Note that wsvn.php need not be in the /websvn directory (and normally isn't). $locwebsvnhttp = "/websvn"; // Physical location of websvn directory $locwebsvnreal = "d:/svnpage/websvn"; Next, turn on Multiviews in the WebSVN config.inc file: $config->useMultiViews(); Finally, Apache needs to know that you want to enable MultiViews for the root directory. This can be done by including this line in the directory's .htaccess file (assuming that the appropriate AllowOverrides directive is set up): Options MultiViews If all has gone well, repositories should now by accessible by http://servername/wsvn/repname

          Jason Chaffee added a comment -

          I found one bug in the file I attached and that is is build 139. The diff link
          needs one more param added. Therefore,

          return new URL(url,
          trimHeadSlash(path.getValue()) +
          param().add("opp=diff").add("rev=" + (r - 1)));

          should be

          return new URL(url,
          trimHeadSlash(path.getValue()) +
          param().add("opp=diff").add("rev=" + (r - 1)).add("sc=0"));

          Jason Chaffee added a comment - I found one bug in the file I attached and that is is build 139. The diff link needs one more param added. Therefore, return new URL(url, trimHeadSlash(path.getValue()) + param().add("opp=diff").add("rev=" + (r - 1))); should be return new URL(url, trimHeadSlash(path.getValue()) + param().add("opp=diff").add("rev=" + (r - 1)).add("sc=0"));

            Unassigned Unassigned
            jasonchaffee Jason Chaffee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: