diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index 77f7d015c..bbc4a2d61 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -164,7 +164,7 @@ module Redmine return [] end end - cmd = "#{HG_BIN} -R #{target('')} diff --nodates --git #{diff_args}" + cmd = "#{HG_BIN} -R #{target('')} --config diff.git=false diff --nodates #{diff_args}" cmd << " -I #{target(path)}" unless path.empty? shellout(cmd) do |io| io.each_line do |line| diff --git a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb index ed68eeaa8..24862681a 100644 --- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb @@ -58,8 +58,8 @@ begin end [4, 'def6d2f1254a'].each do |r2| diff2 = @adapter.diff(nil,r1,r2) - assert_equal 50, diff2.size - buf = diff2[42].gsub(/\r\n|\r|\n/, "") + assert_equal 49, diff2.size + buf = diff2[41].gsub(/\r\n|\r|\n/, "") assert_equal "+class WelcomeController < ApplicationController", buf diff3 = @adapter.diff('sources/watchers_controller.rb', r1, r2) assert_equal 20, diff3.size