Setting up ViewVC integration with JIRA for repository file tracking

I’m struggling with integrating ViewVC into my JIRA setup and need help with the proper URL configurations. The current setup isn’t displaying file differences correctly when I try to view repository changes.

Current Issue: I’ve been trying to use this URL pattern to show file modifications: http://myserver/svn/project${path}/?revision=${rev}&r1=${rev}&r2=${rev-1}. However, this isn’t working as expected and I’m not getting the file comparison view between versions.

What I Need: Can someone help me with the correct URL formats for these different scenarios:

  • Changeset display format
  • Newly added file format
  • Modified file format
  • File replacement format
  • Deleted file format

Any guidance on the proper ViewVC URL structure would be really appreciated. I’ve been stuck on this configuration for a while now.

had the same headache last month! it’s probably your ViewVC version - older ones can’t handle ${rev-1} syntax. try hardcoding the revision numbers first to see if it works at all, then switch to variables.

Your URL pattern has a basic problem - you’re comparing the same revision against itself with r1=${rev}&r2=${rev-1}, so you won’t see any real differences. I ran into this exact issue at my company and found that ViewVC needs specific parameters for different displays. For modified files, use: http://myserver/svn/project${path}?view=diff&pathrev=${rev}&r1=${rev-1}&r2=${rev}. The key is adding pathrev=${rev} and getting the revision order right. ViewVC handles deleted files differently - point to the directory that contained the deleted file, not the file itself: http://myserver/svn/project/directory?view=revision&revision=${rev} to see what got removed. Also check your ViewVC config file. Make sure allowed_views includes ‘diff’ and ‘revision’ views - restrictive settings there can break these URLs even when they’re formatted correctly.

I encountered similar issues with ViewVC integration into JIRA a while back. The main challenge often lies in the URL parameters. For viewing file differences, the correct format is crucial; I found that using http://myserver/svn/project${path}?view=diff&r1=${rev-1}&r2=${rev} effectively worked for comparisons. This view=diff parameter is essential for accessing the diff view. For changesets, you can use http://myserver/svn/project?view=revision&revision=${rev} to get a complete overview. When it comes to new files, the URL http://myserver/svn/project${path}?view=markup&revision=${rev} is most effective, as new files don’t have a previous version to compare against. Deleted files require a slightly different approach; you can try http://myserver/svn/project${path}?view=markup&revision=${rev-1} to view the last existing version. Lastly, double-check that your ViewVC configuration file accurately reflects your SVN repository paths, as incorrect settings can lead to these issues.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.