Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. SVN repository revision strangeness

SVN repository revision strangeness

Added by Richard McAleer about 7 years ago

Hi

I have recently installed openproject locally and have linked it to our existing SVN repository.

I can see the subversion repository listed at:
projects/<name>/repository

it shows:

  • sizes for files
  • age and author for both folders and files
    but no revisions

clicking on a file link

  • history looks empty
  • view looks fine
  • annotate correctly displays a blame output with revision links

however if I follow a revision link I get:
404 “The entry or revision was not found in the repository”

In the debug logs the entry always looks the same (even in the failing cases):
@ Shelling out: `svn info —xml https://// —username xxxx —password xxxx —no-auth-cache —non-interactive`@

- if I issue this manually I get a result

Digging further in the logs I find elements that look like:

D, [2018-03-28T11:06:03.548076 #742] DEBUG -- : Fetching changesets for repository https://<url>
E, [2018-03-28T11:06:03.570188 #742] ERROR -- : SCM command failed: Non-zero exit code (pid 1282 exit 1) for `svn`
D, [2018-03-28T11:06:03.570301 #742] DEBUG -- : Error output is svn: E160013: '<url1>/!svn/rvr/200/<url2>' path not found
E, [2018-03-28T11:06:03.570402 #742] ERROR -- : Failed to fetch changesets from repository: SCM command failed: Non-zero exit code (pid 1282 exit 1) for `svn`

where above is the concatenation of and
- so it looks like the “/!svn/rvr/200/” inserted has caused this to fail

itself is of the form :
<base>/Projects/<dept>/<projectname>

any pointers on where to look next would be gratefully received

all the best
- richard


Replies (3)

RE: SVN repository revision strangeness - Added by Richard McAleer about 7 years ago

digging further I believe the problem is down to the root folder of the project source not existing in the original revision of the repository

- does anyone know how I can tell openproject the “earliest” revision of the repository to use?

thanks
- richard

RE: SVN repository revision strangeness - Added by Richard McAleer about 7 years ago

If I can’t configure openproject to use a specific revision as the root of the repository is there any other possible work around for this?

Thanks
- r

RE: SVN repository revision strangeness - Added by Richard McAleer about 7 years ago

I have managed to solve this with a bit of a mod to /app/models/repository/subversion.rb

in essence skipping the Changeset.create if there is nothing in the revision author field:

diff --git a/app/models/repository/subversion.rb b/app/models/repository/subversion.rb
index b050baf..c0f878a 100644
--- a/app/models/repository/subversion.rb
+++ b/app/models/repository/subversion.rb
@@ -107,15 +107,17 @@
           revisions = scm.revisions('', identifier_to, identifier_from, with_paths: true)
           revisions.reverse_each do |revision|
             transaction do
-              changeset = Changeset.create(repository: self,
+            if !revision.author.to_s.empty?
+                changeset = Changeset.create(repository: self,
                                            revision: revision.identifier,
                                            committer: revision.author,
                                            committed_on: revision.time,
                                            comments: revision.message)

-              revision.paths.each do |change|
-                changeset.create_change(change)
-              end unless changeset.new_record?
+                revision.paths.each do |change|
+                  changeset.create_change(change)
+                end unless changeset.new_record?
+              end
             end
           end unless revisions.nil?
           identifier_from = identifier_to + 1

hopefully this might be helpful if anyone else bumps in to this
all the best
- r

  • (1 - 3/3)
Loading...