diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-02 00:40:59 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-02 00:40:59 +0000 |
commit | d45bf0a83eb7687ae2fed9c6376e12650747a202 (patch) | |
tree | b6ca40ba04b00ca7914af491717c90ce8a77a939 /app/models/repository | |
parent | f2ec6f8d77ec1fd9f00ab1c24dc1379c70245f6b (diff) | |
download | redmine-d45bf0a83eb7687ae2fed9c6376e12650747a202.tar.gz redmine-d45bf0a83eb7687ae2fed9c6376e12650747a202.zip |
scm: split Repository#entries (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12754 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository')
-rw-r--r-- | app/models/repository/bazaar.rb | 4 | ||||
-rw-r--r-- | app/models/repository/cvs.rb | 4 | ||||
-rw-r--r-- | app/models/repository/darcs.rb | 4 | ||||
-rw-r--r-- | app/models/repository/git.rb | 7 |
4 files changed, 9 insertions, 10 deletions
diff --git a/app/models/repository/bazaar.rb b/app/models/repository/bazaar.rb index b7c4e9ef4..c1806805a 100644 --- a/app/models/repository/bazaar.rb +++ b/app/models/repository/bazaar.rb @@ -57,7 +57,7 @@ class Repository::Bazaar < Repository scm.diff(path, rev, rev_to) end - def entries(path=nil, identifier=nil) + def scm_entries(path=nil, identifier=nil) scm.bzr_path_encodig = log_encoding entries = scm.entries(path, identifier) if entries @@ -80,9 +80,9 @@ class Repository::Bazaar < Repository end end end - load_entries_changesets(entries) entries end + protected :scm_entries def fetch_changesets scm.bzr_path_encodig = log_encoding diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb index f238a4d81..a146fce95 100644 --- a/app/models/repository/cvs.rb +++ b/app/models/repository/cvs.rb @@ -47,7 +47,7 @@ class Repository::Cvs < Repository scm.entry(path, rev.nil? ? nil : rev.committed_on) end - def entries(path=nil, identifier=nil) + def scm_entries(path=nil, identifier=nil) rev = nil if ! identifier.nil? rev = changesets.find_by_revision(identifier) @@ -69,9 +69,9 @@ class Repository::Cvs < Repository end end end - load_entries_changesets(entries) entries end + protected :scm_entries def cat(path, identifier=nil) rev = nil diff --git a/app/models/repository/darcs.rb b/app/models/repository/darcs.rb index 9b72ab544..ee6192118 100644 --- a/app/models/repository/darcs.rb +++ b/app/models/repository/darcs.rb @@ -45,7 +45,7 @@ class Repository::Darcs < Repository scm.entry(path, patch.nil? ? nil : patch.scmid) end - def entries(path=nil, identifier=nil) + def scm_entries(path=nil, identifier=nil) patch = nil if ! identifier.nil? patch = changesets.find_by_revision(identifier) @@ -66,9 +66,9 @@ class Repository::Darcs < Repository end end end - load_entries_changesets(entries) entries end + protected :scm_entries def cat(path, identifier=nil) patch = identifier.nil? ? nil : changesets.find_by_revision(identifier.to_s) diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index bb26a34f9..c51a7e58a 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -93,11 +93,10 @@ class Repository::Git < Repository end end - def entries(path=nil, identifier=nil) - entries = scm.entries(path, identifier, :report_last_commit => extra_report_last_commit) - load_entries_changesets(entries) - entries + def scm_entries(path=nil, identifier=nil) + scm.entries(path, identifier, :report_last_commit => extra_report_last_commit) end + protected :scm_entries # With SCMs that have a sequential commit numbering, # such as Subversion and Mercurial, |