scm: mercurial: accept both of revision and nodeid as changeset id (#3724).

Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4654 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2011-01-08 06:24:27 +00:00
parent 3ad213c29a
commit e2df831b53
3 changed files with 40 additions and 1 deletions
@@ -47,6 +47,17 @@ begin
assert_nil @adapter.cat("sources/welcome_controller.rb")
end
def test_access_by_nodeid
path = 'sources/welcome_controller.rb'
assert_equal @adapter.cat(path, 2), @adapter.cat(path, '400bb8672109')
end
def test_access_by_fuzzy_nodeid
path = 'sources/welcome_controller.rb'
# falls back to nodeid
assert_equal @adapter.cat(path, 2), @adapter.cat(path, '400')
end
private
def test_hgversion_for(hgversion, version)