diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-11 13:12:37 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-11 13:12:37 +0000 |
commit | ae2304449b23ef6b277b7cdc6972cffe5461403e (patch) | |
tree | 3c9014d318611dabebe1a9e0b61dbd01ab1f7654 /app | |
parent | 9287f3cf73d620419403fecad198480edd665362 (diff) | |
download | redmine-ae2304449b23ef6b277b7cdc6972cffe5461403e.tar.gz redmine-ae2304449b23ef6b277b7cdc6972cffe5461403e.zip |
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
Diffstat (limited to 'app')
-rw-r--r-- | app/models/repository/cvs.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb index 5cec74e5a..c8f98852e 100644 --- a/app/models/repository/cvs.rb +++ b/app/models/repository/cvs.rb @@ -65,7 +65,11 @@ class Repository::Cvs < Repository end 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) end |