##// END OF EJS Templates
scm: cvs: code clean up model....
Toshi MARUYAMA -
r5330:b091c9823849
parent child
Show More
@@ -125,7 +125,6 class Repository::Cvs < Repository
125 125 # commits in one changeset. cvs update the commit-date when the *,v file was touched. so
126 126 # we use a small delta here, to merge all changes belonging to _one_ changeset
127 127 time_delta=10.seconds
128
129 128 fetch_since = latest_changeset ? latest_changeset.committed_on : nil
130 129 transaction do
131 130 tmp_rev_num = 1
@@ -134,14 +133,18 class Repository::Cvs < Repository
134 133 # is not exclusive at all.
135 134 tmp_time = revision.time.clone
136 135 unless changes.find_by_path_and_revision(
137 scm.with_leading_slash(revision.paths[0][:path]), revision.paths[0][:revision])
136 scm.with_leading_slash(revision.paths[0][:path]),
137 revision.paths[0][:revision]
138 )
138 139 cmt = Changeset.normalize_comments(revision.message, repo_log_encoding)
139 cs = changesets.find(:first, :conditions=>{
140 cs = changesets.find(
141 :first,
142 :conditions => {
140 143 :committed_on=>tmp_time - time_delta .. tmp_time + time_delta,
141 144 :committer=>revision.author,
142 145 :comments=>cmt
143 })
144
146 }
147 )
145 148 # create a new changeset....
146 149 unless cs
147 150 # we use a temporaray revision number here (just for inserting)
@@ -157,7 +160,6 class Repository::Cvs < Repository
157 160 :comments => revision.message)
158 161 tmp_rev_num += 1
159 162 end
160
161 163 #convert CVS-File-States to internal Action-abbrevations
162 164 #default action is (M)odified
163 165 action="M"
@@ -166,7 +168,6 class Repository::Cvs < Repository
166 168 elsif revision.paths[0][:action]=="dead"
167 169 action="D" #dead-state is similar to Delete
168 170 end
169
170 171 Change.create(
171 172 :changeset => cs,
172 173 :action => action,
General Comments 0
You need to be logged in to leave comments. Login now