scm: mercurial: increase limit of branch directory latest changesets.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5146 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-03-16 00:50:53 +00:00 committed by Eric Davis
parent ca2c2a2add
commit 232729d93f
1 changed files with 4 additions and 1 deletions

View File

@ -99,7 +99,10 @@ class Repository::Mercurial < Repository
# Revisions in root directory and sub directory are not equal.
# So, in order to get correct limit, we need to get all revisions.
# But, it is very heavy.
args << scm.nodes_in_branch(rev, :limit => limit)
# Mercurial does not treat direcotry.
# So, "hg log DIR" is very heavy.
branch_limit = path.blank? ? limit : ( limit * 5 )
args << scm.nodes_in_branch(rev, :limit => branch_limit)
elsif last = rev ? find_changeset_by_name(scm.tagmap[rev] || rev) : nil
cond << "#{Changeset.table_name}.id <= ?"
args << last.id