@@ -1,16 +1,16 | |||
|
1 |
# |
|
|
2 |
# Copyright (C) 2006-20 |
|
|
1 | # Redmine - project management software | |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 |
# |
|
|
8 | # | |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 |
# |
|
|
13 | # | |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
@@ -42,12 +42,12 class Repository::Subversion < Repository | |||
|
42 | 42 | revisions = scm.revisions(path, rev, nil, :limit => limit) |
|
43 | 43 | revisions ? changesets.find_all_by_revision(revisions.collect(&:identifier), :order => "committed_on DESC", :include => :user) : [] |
|
44 | 44 | end |
|
45 | ||
|
45 | ||
|
46 | 46 | # Returns a path relative to the url of the repository |
|
47 | 47 | def relative_path(path) |
|
48 | 48 | path.gsub(Regexp.new("^\/?#{Regexp.escape(relative_url)}"), '') |
|
49 | 49 | end |
|
50 | ||
|
50 | ||
|
51 | 51 | def fetch_changesets |
|
52 | 52 | scm_info = scm.info |
|
53 | 53 | if scm_info |
@@ -64,12 +64,12 class Repository::Subversion < Repository | |||
|
64 | 64 | revisions = scm.revisions('', identifier_to, identifier_from, :with_paths => true) |
|
65 | 65 | revisions.reverse_each do |revision| |
|
66 | 66 | transaction do |
|
67 | changeset = Changeset.create(:repository => self, | |
|
68 |
:revision => revision.identifier, |
|
|
69 |
:committer => revision.author, |
|
|
67 | changeset = Changeset.create(:repository => self, | |
|
68 | :revision => revision.identifier, | |
|
69 | :committer => revision.author, | |
|
70 | 70 | :committed_on => revision.time, |
|
71 | :comments => revision.message) | |
|
72 | ||
|
71 | :comments => revision.message) | |
|
72 | ||
|
73 | 73 | revision.paths.each do |change| |
|
74 | 74 | changeset.create_change(change) |
|
75 | 75 | end unless changeset.new_record? |
@@ -80,9 +80,9 class Repository::Subversion < Repository | |||
|
80 | 80 | end |
|
81 | 81 | end |
|
82 | 82 | end |
|
83 | ||
|
83 | ||
|
84 | 84 | private |
|
85 | ||
|
85 | ||
|
86 | 86 | # Returns the relative url of the repository |
|
87 | 87 | # Eg: root_url = file:///var/svn/foo |
|
88 | 88 | # url = file:///var/svn/foo/bar |
General Comments 0
You need to be logged in to leave comments.
Login now