summaryrefslogtreecommitdiffstats
path: root/app/models/repository/mercurial.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-07-11 00:56:09 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-07-11 00:56:09 +0000
commitc2e9e2cf5600928f036fa614eb836e284b24ccba (patch)
treea0dcd2bc590fe26948bda1815080b1319fbb2890 /app/models/repository/mercurial.rb
parent48f6472e0fd310d23f782a43cb735bcc209b93c7 (diff)
downloadredmine-c2e9e2cf5600928f036fa614eb836e284b24ccba.tar.gz
redmine-c2e9e2cf5600928f036fa614eb836e284b24ccba.zip
scm: mercurial: do nothing in fetching if info is nil (#8777).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6246 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository/mercurial.rb')
-rw-r--r--app/models/repository/mercurial.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/repository/mercurial.rb b/app/models/repository/mercurial.rb
index 268d30486..6db3e2566 100644
--- a/app/models/repository/mercurial.rb
+++ b/app/models/repository/mercurial.rb
@@ -126,6 +126,7 @@ class Repository::Mercurial < Repository
private :latest_changesets_cond
def fetch_changesets
+ return if scm.info.nil?
scm_rev = scm.info.lastrev.revision.to_i
db_rev = latest_changeset ? latest_changeset.revision.to_i : -1
return unless db_rev < scm_rev # already up-to-date