]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: change diff option from --git to --config diff.git=false (#7253).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 11 Jan 2011 08:41:35 +0000 (08:41 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 11 Jan 2011 08:41:35 +0000 (08:41 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4688 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/mercurial_adapter.rb
test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb

index 77f7d015caf96f1d636c28b6af4e8b635e8a843b..bbc4a2d61f7b267f45113f815e9c6724861c196f 100644 (file)
@@ -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|
index ed68eeaa824981421feb64ade2e08602ca151de2..24862681af4929c0ad2c5858bd0a17257cf09a3c 100644 (file)
@@ -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