##// END OF EJS Templates
scm: cvs: code clean up....
Toshi MARUYAMA -
r4670:f7f858f05663
parent child
Show More
@@ -104,8 +104,8 class Repository::Cvs < Repository
104 104 scm.revisions('', fetch_since, nil, :with_paths => true) do |revision|
105 105 # only add the change to the database, if it doen't exists. the cvs log
106 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])
108 revision
107 unless changes.find_by_path_and_revision(
108 scm.with_leading_slash(revision.paths[0][:path]), revision.paths[0][:revision])
109 109 cs = changesets.find(:first, :conditions=>{
110 110 :committed_on=>revision.time-time_delta..revision.time+time_delta,
111 111 :committer=>revision.author,
@@ -116,7 +116,6 class Repository::Cvs < Repository
116 116 unless cs
117 117 # we use a temporaray revision number here (just for inserting)
118 118 # later on, we calculate a continous positive number
119 latest = changesets.find(:first, :order => 'id DESC')
120 119 cs = Changeset.create(:repository => self,
121 120 :revision => "_#{tmp_rev_num}",
122 121 :committer => revision.author,
@@ -144,7 +143,9 class Repository::Cvs < Repository
144 143 end
145 144
146 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 149 changeset.update_attribute :revision, next_revision_number
149 150 end
150 151 end # transaction
General Comments 0
You need to be logged in to leave comments. Login now