mirror of
				https://github.com/redmine/redmine.git
				synced 2025-11-03 20:06:24 +01:00 
			
		
		
		
	scm: mercurial: split latest_changesets test to tag and branch
git-svn-id: http://svn.redmine.org/redmine/trunk@12748 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
		@@ -187,8 +187,14 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      changesets = @repository.latest_changesets(path, '12', 1)
 | 
					      changesets = @repository.latest_changesets(path, '12', 1)
 | 
				
			||||||
      assert_equal %w|12|, changesets.collect(&:revision)
 | 
					      assert_equal %w|12|, changesets.collect(&:revision)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def test_latest_changesets_tag
 | 
				
			||||||
 | 
					      assert_equal 0, @repository.changesets.count
 | 
				
			||||||
 | 
					      @repository.fetch_changesets
 | 
				
			||||||
 | 
					      @project.reload
 | 
				
			||||||
 | 
					      assert_equal NUM_REV, @repository.changesets.count
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # tag
 | 
					 | 
				
			||||||
      changesets = @repository.latest_changesets('', 'tag_test.00')
 | 
					      changesets = @repository.latest_changesets('', 'tag_test.00')
 | 
				
			||||||
      assert_equal %w|5 4 3 2 1 0|, changesets.collect(&:revision)
 | 
					      assert_equal %w|5 4 3 2 1 0|, changesets.collect(&:revision)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -200,8 +206,14 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      changesets = @repository.latest_changesets('sources', 'tag_test.00', 2)
 | 
					      changesets = @repository.latest_changesets('sources', 'tag_test.00', 2)
 | 
				
			||||||
      assert_equal %w|4 3|, changesets.collect(&:revision)
 | 
					      assert_equal %w|4 3|, changesets.collect(&:revision)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def test_latest_changesets_branch
 | 
				
			||||||
 | 
					      assert_equal 0, @repository.changesets.count
 | 
				
			||||||
 | 
					      @repository.fetch_changesets
 | 
				
			||||||
 | 
					      @project.reload
 | 
				
			||||||
 | 
					      assert_equal NUM_REV, @repository.changesets.count
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # named branch
 | 
					 | 
				
			||||||
      if @repository.scm.class.client_version_above?([1, 6])
 | 
					      if @repository.scm.class.client_version_above?([1, 6])
 | 
				
			||||||
        changesets = @repository.latest_changesets('', @branch_char_1)
 | 
					        changesets = @repository.latest_changesets('', @branch_char_1)
 | 
				
			||||||
        assert_equal %w|27 26|, changesets.collect(&:revision)
 | 
					        assert_equal %w|27 26|, changesets.collect(&:revision)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user