Project

General

Profile

Actions

Defect #2583

closed

Subversion changeset import does not work reliably

Added by Sebastian Kurfuerst almost 16 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
Start date:
2009-01-26
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

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`) VALUESESC[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

Actions #1

Updated by Jean-Philippe Lang almost 16 years ago

Can you try this patch?

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

I'm also interested to get an extract from your changesets table (eg. SELECT * FROM changesets WHERE revision LIKE '7%').

Actions #2

Updated by Sebastian Kurfuerst over 15 years ago

Hey Jean-Philippe,

the above patch seems to solve our problem! I hope it goes into redmine trunk :-)

Thanks for your great work,
Sebastian

Actions #3

Updated by Jean-Philippe Lang over 15 years ago

  • Category set to SCM
  • Status changed from New to Resolved
  • Target version set to 0.8.3
  • Resolution set to Fixed

Committed in r2563.

Actions #4

Updated by Jean-Philippe Lang over 15 years ago

  • Status changed from Resolved to Closed

Committed in 0.8-stable in r2650.

Actions

Also available in: Atom PDF