diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-15 10:30:56 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-15 10:30:56 +0000 |
commit | 01fdaf5977429d8a40682af915d95bf742c97588 (patch) | |
tree | 4dfb945ac41541b3dc074e3e7084e252ff4fd686 /lib | |
parent | a59e6bfb020f51ec2ae586e2e0e238b9827b7e9a (diff) | |
download | redmine-01fdaf5977429d8a40682af915d95bf742c97588.tar.gz redmine-01fdaf5977429d8a40682af915d95bf742c97588.zip |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/scm/adapters/mercurial_adapter.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index 26bf01140..f4dffd905 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -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 = {} |