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
def test_branches
assert_equal [
'default',
+ 'test-branch-01',
@branch_char_1,
'branch (1)[2]&,%.-3_4',
@branch_char_0,
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',
}
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)
@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
# 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)
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)
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)
@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