@@ -104,8 +104,8 class Repository::Cvs < Repository | |||||
104 | scm.revisions('', fetch_since, nil, :with_paths => true) do |revision| |
|
104 | scm.revisions('', fetch_since, nil, :with_paths => true) do |revision| | |
105 | # only add the change to the database, if it doen't exists. the cvs log |
|
105 | # only add the change to the database, if it doen't exists. the cvs log | |
106 | # is not exclusive at all. |
|
106 | # is not exclusive at all. | |
107 | unless changes.find_by_path_and_revision(scm.with_leading_slash(revision.paths[0][:path]), revision.paths[0][:revision]) |
|
107 | unless changes.find_by_path_and_revision( | |
108 | revision |
|
108 | scm.with_leading_slash(revision.paths[0][:path]), revision.paths[0][:revision]) | |
109 | cs = changesets.find(:first, :conditions=>{ |
|
109 | cs = changesets.find(:first, :conditions=>{ | |
110 | :committed_on=>revision.time-time_delta..revision.time+time_delta, |
|
110 | :committed_on=>revision.time-time_delta..revision.time+time_delta, | |
111 | :committer=>revision.author, |
|
111 | :committer=>revision.author, | |
@@ -116,7 +116,6 class Repository::Cvs < Repository | |||||
116 | unless cs |
|
116 | unless cs | |
117 | # we use a temporaray revision number here (just for inserting) |
|
117 | # we use a temporaray revision number here (just for inserting) | |
118 | # later on, we calculate a continous positive number |
|
118 | # later on, we calculate a continous positive number | |
119 | latest = changesets.find(:first, :order => 'id DESC') |
|
|||
120 | cs = Changeset.create(:repository => self, |
|
119 | cs = Changeset.create(:repository => self, | |
121 | :revision => "_#{tmp_rev_num}", |
|
120 | :revision => "_#{tmp_rev_num}", | |
122 | :committer => revision.author, |
|
121 | :committer => revision.author, | |
@@ -144,7 +143,9 class Repository::Cvs < Repository | |||||
144 | end |
|
143 | end | |
145 |
|
144 | |||
146 | # Renumber new changesets in chronological order |
|
145 | # Renumber new changesets in chronological order | |
147 | changesets.find(:all, :order => 'committed_on ASC, id ASC', :conditions => "revision LIKE '_%'").each do |changeset| |
|
146 | changesets.find( | |
|
147 | :all, :order => 'committed_on ASC, id ASC', :conditions => "revision LIKE '_%'" | |||
|
148 | ).each do |changeset| | |||
148 | changeset.update_attribute :revision, next_revision_number |
|
149 | changeset.update_attribute :revision, next_revision_number | |
149 | end |
|
150 | end | |
150 | end # transaction |
|
151 | end # transaction |
General Comments 0
You need to be logged in to leave comments.
Login now