Vote #64509
完了Subversion changeset import does not work reliably
0%
説明
Hey guys,
when running the command line changeset fetch script, it just aborts at some revision (Development.log snippet below). It's interesting that it works correctly for many projects, but at a certain project (deterministically) it always breaks.
My environment looks as following:
About your application's environment
Ruby version 1.8.6 (i386-freebsd6)
RubyGems version 1.0.1
Rails version 2.1.0
Active Record version 2.1.0
Action Pack version 2.1.0
Active Resource version 2.1.0
Action Mailer version 2.1.0
Active Support version 2.1.0
Application root /var/rails/redmine_trunk
Environment development
Database adapter mysql
Database schema version 95
Shelling out: svn info --xml 'https://svn.typo3.org/TYPO3v4/Extensions/direct_mail/' --config-dir /tmp/.svntmp
ESC[4;35;1mChangeset Load (0.002614)ESC[0m ESC[0mSELECT * FROM changesets
WHERE (changesets
.repository_id = 234) ORDER BY changesets.committed_on DESC, changesets.id DESC LIMIT 1ESC[0m
Shelling out: svn info --xml 'https://svn.typo3.org/TYPO3v4/Extensions/julle_events/' --config-dir /tmp/.svntmp
ESC[4;36;1mChangeset Load (0.000985)ESC[0m ESC[0;1mSELECT * FROM changesets
WHERE (changesets
.repository_id = 235) ORDER BY changesets.committed_on DESC, changesets.id DESC LIMIT 1ESC[0m
Fetching changesets for repository https://svn.typo3.org/TYPO3v4/Extensions/julle_events
Shelling out: svn log --xml -r 786:781 --config-dir /tmp/.svntmp --verbose 'https://svn.typo3.org/TYPO3v4/Extensions/julle_events/'
ESC[4;35;1mSQL (0.000121)ESC[0m ESC[0mBEGINESC[0m
ESC[4;36;1mSQL (0.000280)ESC[0m ESC[0;1mSELECT revision
FROM changesets
WHERE (changesets
.revision = '781' AND changesets
.repository_id = 235) ESC[0m
ESC[4;35;1mChange Columns (0.000935)ESC[0m ESC[0mSHOW FIELDS FROM changes
ESC[0m
ESC[4;36;1mSQL (0.000280)ESC[0m ESC[0;1mSELECT revision
FROM changesets
WHERE (changesets
.revision = '781' AND changesets
.repository_id = 235) ESC[0m
ESC[4;35;1mChange Create (0.000000)ESC[0m ESC[0mMysql::Error: Column 'changeset_id' cannot be null: INSERT INTO changes
(changeset_id
, action
, revision
, branch
, from_path
, path
, from_revision
) VALUES(NULL, 'A', NULL, NULL, NULL, '/julle_events/branches', NULL)ESC[0m
ESC[4;36;1mSQL (0.000074)ESC[0m ESC[0;1mROLLBACKESC[0m
Do you have any idea how to locate the error?
Thanks for your great work,
Sebastian
journals
Can you try this patch?
<pre>
Index: app/models/repository/subversion.rb
===================================================================
--- app/models/repository/subversion.rb (revision 2326)
+++ app/models/repository/subversion.rb (working copy)
@@ -68,7 +68,7 @@
:path => change[:path],
:from_path => change[:from_path],
:from_revision => change[:from_revision])
- end
+ end unless changeset.new_record?
end
end unless revisions.nil?
identifier_from = identifier_to + 1
</pre>
I'm also interested to get an extract from your changesets table (eg. @SELECT * FROM changesets WHERE revision LIKE '7%'@).
--------------------------------------------------------------------------------
Hey Jean-Philippe,
the above patch seems to solve our problem! I hope it goes into redmine trunk :-)
Thanks for your great work,
Sebastian
--------------------------------------------------------------------------------
Committed in r2563.
--------------------------------------------------------------------------------
Committed in 0.8-stable in r2650.
--------------------------------------------------------------------------------