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