From 80b329d031dc29791f850e979d58cba872e1154b Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 11 Jan 2011 08:41:35 +0000 Subject: [PATCH] scm: mercurial: change diff option from --git to --config diff.git=false (#7253). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4688 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/mercurial_adapter.rb | 2 +- test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.5