scm: cvs: cat returns nil if revision does not exist at model.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5408 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-11 13:12:37 +00:00
parent 9287f3cf73
commit ae2304449b
1 changed files with 5 additions and 1 deletions

View File

@ -65,7 +65,11 @@ class Repository::Cvs < Repository
end end
def cat(path, identifier=nil) def cat(path, identifier=nil)
rev = identifier.nil? ? nil : changesets.find_by_revision(identifier) rev = nil
if ! identifier.nil?
rev = changesets.find_by_revision(identifier)
return nil if rev.nil?
end
scm.cat(path, rev.nil? ? nil : rev.committed_on) scm.cat(path, rev.nil? ? nil : rev.committed_on)
end end