Mercurial adapter:

* fetch changesets by batches of 100 (rather than in a single transaction)
* fix: fetch_changesets tries to re-insert the last revision that exists in the db (#860)

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1255 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-03-15 10:30:56 +00:00
parent a59e6bfb02
commit 01fdaf5977
2 changed files with 31 additions and 21 deletions
@@ -71,7 +71,11 @@ module Redmine
def revisions(path=nil, identifier_from=nil, identifier_to=nil, options={})
revisions = Revisions.new
cmd = "#{HG_BIN} -v -R #{target('')} log"
cmd << " -r #{identifier_from.to_i}:" if identifier_from
if identifier_from && identifier_to
cmd << " -r #{identifier_from.to_i}:#{identifier_to.to_i}"
elsif identifier_from
cmd << " -r #{identifier_from.to_i}:"
end
cmd << " --limit #{options[:limit].to_i}" if options[:limit]
shellout(cmd) do |io|
changeset = {}