diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-03-25 12:12:15 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-03-25 12:12:15 +0000 |
commit | 16f9f50f50dbac49b1f791c7c2892420a354bc43 (patch) | |
tree | efaebfb9dd13bde6d45afa36b39063772d9116de /app/models/changeset.rb | |
parent | 6f1dcdc08f401923ac77254ca22fd520582bcf6f (diff) | |
download | redmine-16f9f50f50dbac49b1f791c7c2892420a354bc43.tar.gz redmine-16f9f50f50dbac49b1f791c7c2892420a354bc43.zip |
SVN commits are now stored in the database, and added to the activity view and the search engine.
New commits are automatically retrieved and stored when consulting the repository in the app. This behaviour can be disabled by unchecking 'Autofecth commits' in configuration settings.
Commits can be fetched offline by running (recommanded at least for the initial import of past commits):
ruby script/runner "Repository.fetch_changesets"
It will load commits for all of the repositories.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@377 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/changeset.rb')
-rw-r--r-- | app/models/changeset.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/models/changeset.rb b/app/models/changeset.rb new file mode 100644 index 000000000..fa60f1db8 --- /dev/null +++ b/app/models/changeset.rb @@ -0,0 +1,25 @@ +# redMine - project management software +# Copyright (C) 2006-2007 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class Changeset < ActiveRecord::Base + belongs_to :repository + has_many :changes, :dependent => :delete_all + + validates_presence_of :repository_id, :revision, :committed_on + validates_numericality_of :revision, :only_integer => true + validates_uniqueness_of :revision, :scope => :repository_id +end |