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