]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: remove unused parameters from "nodes_in_branch()" method in adapter...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 13 Mar 2011 15:03:05 +0000 (15:03 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 13 Mar 2011 15:03:05 +0000 (15:03 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5108 e93f8b46-1217-0410-a6f0-8f06a7374b81

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

index df021ea1c7c8d28e2b96631f3832d5a22ec75c16..d5266e9bf43be1c08965b58dc0a090b2d3d7cf03 100644 (file)
@@ -220,13 +220,11 @@ module Redmine
         end
 
         # Returns list of nodes in the specified branch
-        def nodes_in_branch(branch, path=nil, identifier_from=nil, identifier_to=nil, options={})
-          p1 = scm_iconv(@path_encoding, 'UTF-8', path)
+        def nodes_in_branch(branch, options={})
           hg_args = ['rhlog', '--template', '{node|short}\n', '--rhbranch', CGI.escape(branch)]
-          hg_args << '--from' << CGI.escape(hgrev(identifier_from))
-          hg_args << '--to'   << CGI.escape(hgrev(identifier_to))
+          hg_args << '--from' << CGI.escape(branch)
+          hg_args << '--to'   << '0'
           hg_args << '--limit' << options[:limit] if options[:limit]
-          hg_args << CGI.escape(hgtarget(p1)) unless path.blank?
           hg(*hg_args) { |io| io.readlines.map { |e| e.chomp } }
         end
 
index 5c423f0c39b856057f90a5bcab9852ee7495ad39..84f5c2978f07108cdac9d038a86792020862c14c 100644 (file)
@@ -286,21 +286,21 @@ begin
             'test_branch.latin-1',
             'test-branch-00',
                ].each do |bra|
-          nib0 = @adapter.nodes_in_branch(bra, '', bra, 0)
+          nib0 = @adapter.nodes_in_branch(bra)
           assert nib0
-          nib1 = @adapter.nodes_in_branch(bra, '', bra, 0, :limit => 1)
+          nib1 = @adapter.nodes_in_branch(bra, :limit => 1)
           assert_equal 1, nib1.size
           case bra
             when 'branch (1)[2]&,%.-3_4'
               assert_equal 3, nib0.size
               assert_equal nib0[0], 'afc61e85bde7'
-              nib2 = @adapter.nodes_in_branch(bra, '', bra, 0, :limit => 2)
+              nib2 = @adapter.nodes_in_branch(bra, :limit => 2)
               assert_equal 2, nib2.size
               assert_equal nib2[1], '933ca60293d7'
             when @branch_char_1
               assert_equal 2, nib0.size
               assert_equal nib0[1], '08ff3227303e'
-              nib2 = @adapter.nodes_in_branch(bra, '', bra, 0, :limit => 1)
+              nib2 = @adapter.nodes_in_branch(bra, :limit => 1)
               assert_equal 1, nib2.size
               assert_equal nib2[0], '7bbf4c738e71'
           end