Commit 560c1bf1 authored by tmaruyama's avatar tmaruyama
Browse files

scm: git: add test of revisions() in merged revisions in unit adapter test (#7146).

Git branch is a reference of specific revision.
Git branch is equivalent with Mercurial *heads*.
http://mercurial.selenic.com/wiki/GitConcepts?action=recall&rev=53#Branch_model

32ae898b7 in git test repository is a merged revision with two heads.
713f49446 and 4a07fe31b *were* in different branches before merged.
713f49446 and 4a07fe31b are descendants of 61b685fbe5.
4a07fe31b is a child of 61b685fbe5.
To get revisions from 713f4944648826f5 to master,
"git log" needs to return 4a07fe31b.

git-svn-id: https://svn.redmine.org/redmine/trunk@5760 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 765a423e
......@@ -105,6 +105,21 @@ begin
assert_equal '7234cb2750b63f47bff735edc50a1c0a433c2518', revs2[ 0].identifier
end
def test_revisions_master_merged_rev
revs1 = @adapter.revisions('',
"713f4944648826f558cf548222f813dabe7cbb04",
"master",
{:reverse => true})
assert_equal 8, revs1.length
assert_equal 'fba357b886984ee71185ad2065e65fc0417d9b92', revs1[ 0].identifier
assert_equal '7e61ac704deecde634b51e59daa8110435dcb3da', revs1[ 1].identifier
# 4a07fe31b is not a child of 713f49446
assert_equal '4a07fe31bffcf2888791f3e6cbc9c4545cefe3e8', revs1[ 2].identifier
# Merged revision
assert_equal '32ae898b720c2f7eec2723d5bdd558b4cb2d3ddf', revs1[ 3].identifier
assert_equal '83ca5fd546063a3c7dc2e568ba3355661a9e2b2c', revs1[-1].identifier
end
def test_revisions_branch_latin_1_path_encoding_all
revs1 = @adapter.revisions('', nil, "latin-1-path-encoding",{})
assert_equal 8, revs1.length
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment