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