scm: mercurial: update test repository (#5501)
This test repository has one merged revision. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7662 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
370de46974
commit
476c3d54b7
Binary file not shown.
|
@ -28,7 +28,7 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
|
|||
REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
|
||||
CHAR_1_HEX = "\xc3\x9c"
|
||||
PRJ_ID = 3
|
||||
NUM_REV = 29
|
||||
NUM_REV = 32
|
||||
|
||||
ruby19_non_utf8_pass =
|
||||
(RUBY_VERSION >= '1.9' && Encoding.default_external.to_s != 'UTF-8')
|
||||
|
|
|
@ -72,8 +72,8 @@ begin
|
|||
adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo)
|
||||
repo_path = adp.info.root_url.gsub(/\\/, "/")
|
||||
assert_equal REPOSITORY_PATH, repo_path
|
||||
assert_equal '28', adp.info.lastrev.revision
|
||||
assert_equal '3ae45e2d177d',adp.info.lastrev.scmid
|
||||
assert_equal '31', adp.info.lastrev.revision
|
||||
assert_equal '31eeee7395c8',adp.info.lastrev.scmid
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -257,6 +257,7 @@ begin
|
|||
def test_branches
|
||||
assert_equal [
|
||||
'default',
|
||||
'test-branch-01',
|
||||
@branch_char_1,
|
||||
'branch (1)[2]&,%.-3_4',
|
||||
@branch_char_0,
|
||||
|
@ -267,10 +268,11 @@ begin
|
|||
|
||||
def test_branchmap
|
||||
bm = {
|
||||
'default' => '3ae45e2d177d',
|
||||
'default' => '31eeee7395c8',
|
||||
'test_branch.latin-1' => 'c2ffe7da686a',
|
||||
'branch (1)[2]&,%.-3_4' => 'afc61e85bde7',
|
||||
'test-branch-00' => '3a330eb32958',
|
||||
"test-branch-01" => 'ad4dc4f80284',
|
||||
@branch_char_0 => 'c8d3e4887474',
|
||||
@branch_char_1 => '7bbf4c738e71',
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||
fixtures :projects
|
||||
|
||||
REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
|
||||
NUM_REV = 29
|
||||
NUM_REV = 32
|
||||
CHAR_1_HEX = "\xc3\x9c"
|
||||
|
||||
if File.directory?(REPOSITORY_PATH)
|
||||
|
@ -56,7 +56,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||
@repository.fetch_changesets
|
||||
@project.reload
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
assert_equal 37, @repository.changes.count
|
||||
assert_equal 46, @repository.changes.count
|
||||
assert_equal "Initial import.\nThe repository contains 3 files.",
|
||||
@repository.changesets.find_by_revision('0').comments
|
||||
end
|
||||
|
@ -109,19 +109,19 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||
|
||||
# with_limit
|
||||
changesets = @repository.latest_changesets('', nil, 2)
|
||||
assert_equal %w|28 27|, changesets.collect(&:revision)
|
||||
assert_equal %w|31 30|, changesets.collect(&:revision)
|
||||
|
||||
# with_filepath
|
||||
changesets = @repository.latest_changesets(
|
||||
'/sql_escape/percent%dir/percent%file1.txt', nil)
|
||||
assert_equal %w|11 10 9|, changesets.collect(&:revision)
|
||||
assert_equal %w|30 11 10 9|, changesets.collect(&:revision)
|
||||
|
||||
changesets = @repository.latest_changesets(
|
||||
'/sql_escape/underscore_dir/understrike_file.txt', nil)
|
||||
assert_equal %w|12 9|, changesets.collect(&:revision)
|
||||
assert_equal %w|30 12 9|, changesets.collect(&:revision)
|
||||
|
||||
changesets = @repository.latest_changesets('README', nil)
|
||||
assert_equal %w|28 17 8 6 1 0|, changesets.collect(&:revision)
|
||||
assert_equal %w|31 30 28 17 8 6 1 0|, changesets.collect(&:revision)
|
||||
|
||||
changesets = @repository.latest_changesets('README','8')
|
||||
assert_equal %w|8 6 1 0|, changesets.collect(&:revision)
|
||||
|
@ -135,7 +135,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||
|
||||
path = 'sql_escape/percent%dir'
|
||||
changesets = @repository.latest_changesets(path, nil)
|
||||
assert_equal %w|13 11 10 9|, changesets.collect(&:revision)
|
||||
assert_equal %w|30 13 11 10 9|, changesets.collect(&:revision)
|
||||
|
||||
changesets = @repository.latest_changesets(path, '11')
|
||||
assert_equal %w|11 10 9|, changesets.collect(&:revision)
|
||||
|
@ -145,7 +145,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||
|
||||
path = 'sql_escape/underscore_dir'
|
||||
changesets = @repository.latest_changesets(path, nil)
|
||||
assert_equal %w|13 12 9|, changesets.collect(&:revision)
|
||||
assert_equal %w|30 13 12 9|, changesets.collect(&:revision)
|
||||
|
||||
changesets = @repository.latest_changesets(path, '12')
|
||||
assert_equal %w|12 9|, changesets.collect(&:revision)
|
||||
|
@ -312,7 +312,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||
@repository.fetch_changesets
|
||||
@project.reload
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
%w|28 3ae45e2d177d 3ae45|.each do |r1|
|
||||
%w|31 31eeee7395c8 31eee|.each do |r1|
|
||||
changeset = @repository.find_changeset_by_name(r1)
|
||||
assert_nil changeset.next
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue