Project

General

Profile

Actions

Feature #13945

closed

Disable autofetching of repository changesets if projects are closed

Added by Mischa The Evil almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

When Setting.autofetch_changesets == true repository changesets are automatically fetched (and added) when Repository#show is executed.
This behavior feels a bit weird if a project is closed and thus read-only.

It can be disabled by adding a new condition to the if construct in source:/trunk/app/controllers/repositories_controller.rb@11784#L114, like:

Index: app/controllers/repositories_controller.rb
===================================================================
--- app/controllers/repositories_controller.rb  (revision 11784)
+++ app/controllers/repositories_controller.rb  (working copy)
@@ -111,7 +111,7 @@
   end

   def show
-    @repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty?
+    @repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty? && @project.active?

     @entries = @repository.entries(@path, @rev)
     @changeset = @repository.find_changeset_by_name(@rev)

Actions

Also available in: Atom PDF