Actions
Feature #13945
closedDisable autofetching of repository changesets if projects are closed
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