You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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