From d45bf0a83eb7687ae2fed9c6376e12650747a202 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 2 Feb 2014 00:40:59 +0000 Subject: scm: split Repository#entries (#14361) git-svn-id: http://svn.redmine.org/redmine/trunk@12754 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository/bazaar.rb | 4 ++-- app/models/repository/cvs.rb | 4 ++-- app/models/repository/darcs.rb | 4 ++-- app/models/repository/git.rb | 7 +++---- 4 files changed, 9 insertions(+), 10 deletions(-) (limited to 'app/models/repository') 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, -- cgit v1.2.3