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
This commit is contained in:
Toshi MARUYAMA 2011-07-11 00:56:09 +00:00
parent 48f6472e0f
commit c2e9e2cf56
1 changed files with 1 additions and 0 deletions

View File

@ -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