I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

identifier-check.patch

LluĂ­s -, 09 Jan 2015 18:34

Download (1.54 KB)

View differences:

config/locales/en.yml (working copy)
23 23
      messages:
24 24
        should_be_of_format_local: should be of format "%{repository_format}"
25 25
        already_exists: already exists
26
        name_mismatch: Mismatch between repository identifier and path
26 27
        scm_not_supported: This SCM is not supported
27 28
        repository_exists_for_identifier: Repository already exists for this project identifier
28 29
        scm_repositories_maximum_count_exceeded: Maximum count (%{max}) of repositories exceeded
lib/scm_repositories_controller_patch.rb (working copy)
237 237
                path = interface.default_path(name)
238 238
                if interface.repository_exists?(name)
239 239
                    repository.errors.add(:url, :already_exists)
240
                elsif (repository.identifier.present? and name != repository.project.identifier + "." + repository.identifier) or
241
                      (not repository.identifier.present? and name != repository.project.identifier)
242
                    repository.errors.add(:base, :name_mismatch)
240 243
                else
241 244
                    Rails.logger.info "Creating reporitory: #{path}"
242 245
                    interface.execute(ScmConfig['pre_create'], path, @project) if ScmConfig['pre_create']
Terms of use | Privacy policy