annotate .svn/pristine/b6/b6d670172a09c11965c73ff10d0fdb7558766e0d.svn-base @ 1519:afce8026aaeb redmine-2.4-integration

Merge from branch "live"
author Chris Cannam
date Tue, 09 Sep 2014 09:34:53 +0100
parents cbb26bc654de
children
rev   line source
Chris@909 1 # Redmine - project management software
Chris@909 2 # Copyright (C) 2006-2011 Jean-Philippe Lang
Chris@909 3 #
Chris@909 4 # FileSystem adapter
Chris@909 5 # File written by Paul Rivier, at Demotera.
Chris@909 6 #
Chris@909 7 # This program is free software; you can redistribute it and/or
Chris@909 8 # modify it under the terms of the GNU General Public License
Chris@909 9 # as published by the Free Software Foundation; either version 2
Chris@909 10 # of the License, or (at your option) any later version.
Chris@909 11 #
Chris@909 12 # This program is distributed in the hope that it will be useful,
Chris@909 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@909 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@909 15 # GNU General Public License for more details.
Chris@909 16 #
Chris@909 17 # You should have received a copy of the GNU General Public License
Chris@909 18 # along with this program; if not, write to the Free Software
Chris@909 19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Chris@909 20
Chris@909 21 require 'redmine/scm/adapters/filesystem_adapter'
Chris@909 22
Chris@909 23 class Repository::Filesystem < Repository
Chris@909 24 attr_protected :root_url
Chris@909 25 validates_presence_of :url
Chris@909 26
Chris@909 27 def self.human_attribute_name(attribute_key_name)
Chris@909 28 attr_name = attribute_key_name
Chris@909 29 if attr_name == "url"
Chris@909 30 attr_name = "root_directory"
Chris@909 31 end
Chris@909 32 super(attr_name)
Chris@909 33 end
Chris@909 34
Chris@909 35 def self.scm_adapter_class
Chris@909 36 Redmine::Scm::Adapters::FilesystemAdapter
Chris@909 37 end
Chris@909 38
Chris@909 39 def self.scm_name
Chris@909 40 'Filesystem'
Chris@909 41 end
Chris@909 42
Chris@909 43 def supports_all_revisions?
Chris@909 44 false
Chris@909 45 end
Chris@909 46
Chris@909 47 def entries(path=nil, identifier=nil)
Chris@909 48 scm.entries(path, identifier)
Chris@909 49 end
Chris@909 50
Chris@909 51 def fetch_changesets
Chris@909 52 nil
Chris@909 53 end
Chris@909 54 end